chore: add mcp documentation

This commit is contained in:
Abhishek Kumar 2026-04-17 12:01:57 +05:30
parent 5ecc0d4da9
commit 599dae87a9
6 changed files with 120 additions and 86 deletions

View file

@ -33,8 +33,10 @@ async def list_workflows(status: str | None = None) -> list[dict]:
async def get_workflow(workflow_id: int) -> dict:
"""Fetch a single agent by id, including its current published definition."""
user = await authenticate_mcp_request()
workflow = await db_client.get_workflow_by_id(workflow_id)
if not workflow or workflow.organization_id != user.selected_organization_id:
workflow = await db_client.get_workflow(
workflow_id, organization_id=user.selected_organization_id
)
if not workflow:
raise HTTPException(status_code=404, detail=f"Workflow {workflow_id} not found")
current = workflow.current_definition