You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inline $ref in tool inputSchema for LLM consumption (parity with typescript-sdk) #2384
P2Moderate issues affecting some users, edge cases, potentially valuable featureenhancementRequest for a new feature that's not currently supportedneeds decisionIssue is actionable, needs maintainer decision on whether to implement
tools/base.py:76 uses raw model_json_schema() which emits $ref/$defs for nested Pydantic models. LLM clients consuming tools/list often can't resolve $ref, leading to params being passed as stringified JSON instead of structured objects.
typescript-sdk addresses this in modelcontextprotocol/typescript-sdk#1563 by adding a dereferenceLocalRefs() step that inlines local $ref and throws on cycles (matching go-sdk precedent). Python should do the equivalent in the tool schema pipeline so all SDKs emit LLM-consumable schemas.
P2Moderate issues affecting some users, edge cases, potentially valuable featureenhancementRequest for a new feature that's not currently supportedneeds decisionIssue is actionable, needs maintainer decision on whether to implement
Activity
RudrenduPaul commentedon Apr 11, 2026
RudrenduPaul commentedon Apr 11, 2026
feat(tools): inline local $ref pointers in tool inputSchema (modelcon…
feat(tools): inline local $ref pointers in tool inputSchema (modelcon…
test: update test_pydantic_model_function for inlined $ref schema (mo…