Skip to content

MCP: return structured results from Cloud deploy/connection/sync tools instead of prose strings #1306

Description

@devin-ai-integration

Problem

Several Cloud MCP tools that create resources or start jobs return a prose sentence (-> str) instead of a structured object. An agent has to parse IDs and URLs out of free text, for example:

Sync started. Job ID is '<job_id>' and job URL is: <job_url>

We noticed this while testing the local stdio MCP end to end against Airbyte OSS 2.3.0. The deploy → connect → sync flow worked, but each step's IDs had to be scraped from sentences before the next call could use them.

Affected tools (airbyte/mcp/cloud.py):

  • deploy_connector_to_cloud (source and destination deploys)
  • deploy_noop_destination_to_cloud
  • create_connection_on_cloud
  • run_cloud_sync

Proposal

Return Pydantic result models, as the read/list tools already do, so FastMCP emits structuredContent plus an output schema. Pseudocode:

class CloudSyncStartedResult(BaseModel):
    workspace_id: str
    connection_id: str
    job_id: int
    job_url: str
    status: str | None  # set when wait=True

class CloudConnectorDeployResult(BaseModel):
    workspace_id: str
    connector_id: str      # source_id / destination_id
    connector_name: str
    connector_url: str

This changes the tool contract (return type and schema), so it should be a deliberate change on release-candidate/v1. It is separate from the workspace fix in #1305.

Written by Devin

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions