Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- MCP adapter reads tool schemas from fastmcp's own `Tool` instead of the
protocol `Tool`, so it works on fastmcp 3 and 4 without touching the
fields MCP SDK 2 renamed. The `mcp` extra now allows `fastmcp>=3,<5`.
- MCP adapter subscriptions declare `data_type`, so handlers receive parsed
request models instead of raw dicts. Covered by a new end-to-end test.
- `setup_tracing` type errors: exporter selection is typed, `endpoint` is
passed explicitly, and the unused provider reassignment is gone.
- A2A adapter type errors: `A2AConfig` imports `SecurityScheme`
Expand Down
14 changes: 6 additions & 8 deletions sdk/eggai/adapters/mcp/mcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

@agent.subscribe(
channel=c("list.in"),
data_type=ToolListRequestMessage,
auto_offset_reset="latest",
group_id=name + "_tools_list_in",
)
Expand All @@ -39,15 +40,11 @@
mcp_tools = await mcp_server.list_tools()
tools: list[ExternalTool] = []
for tool in mcp_tools:
# fastmcp 3.x returns FunctionTool objects whose schemas live on
# `parameters`/`output_schema`; convert to the MCP protocol Tool to
# read the canonical `inputSchema`/`outputSchema` fields.
mcp_tool = tool.to_mcp_tool()
external_tool = ExternalTool(
name=mcp_tool.name,
description=mcp_tool.description or "",
parameters=mcp_tool.inputSchema or {},
return_type=mcp_tool.outputSchema or {},
name=tool.name,
description=tool.description or "",
parameters=tool.parameters,

Check failure on line 46 in sdk/eggai/adapters/mcp/mcp.py

View workflow job for this annotation

GitHub Actions / QualOps Code Quality

HIGH: bug

Field `tool.parameters` may not exist on FastMCP Tool objects; the correct attribute is likely `inputSchema` or `input_schema`.
return_type=tool.output_schema or {},

Check warning on line 47 in sdk/eggai/adapters/mcp/mcp.py

View workflow job for this annotation

GitHub Actions / QualOps Code Quality

MEDIUM: bug

Field `tool.output_schema` may not exist on FastMCP Tool objects, causing an AttributeError at runtime.
)
tools.append(external_tool)

Expand All @@ -59,6 +56,7 @@

@agent.subscribe(
channel=c("calls.in"),
data_type=ToolCallRequestMessage,
auto_offset_reset="latest",
group_id=name + "_tool_calls_in",
)
Expand Down
195 changes: 143 additions & 52 deletions sdk/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading