Skip to content

[BUG] [v0.0.7] cortex-mcp-types Tool inputSchema rejects valid $ref property schemas #53320

@marvinayisi

Description

@marvinayisi

Project

cortex

Description

A valid tool inputSchema whose property definition uses $ref fails to deserialize into Tool.

Error Message

TOOL_REF_PROPERTY_PARSE=Err(Error("missing field `type`", line: 0, column: 0))

Debug Logs

N/A

System Information

Cortex crate: cortex-mcp-types 0.0.7
Commit: 7954d02
Date: 2026-04-10
OS: macOS

Screenshots

https://github.com/marvinayisi/issue-images/blob/main/mcp-tool-ref-property-20260410-074112.png

Steps to Reproduce

  1. Create a tiny Rust crate depending on cortex-mcp-types from this workspace.
  2. Deserialize a tool definition whose inputSchema.properties.query is { "$ref": "#/defs/query" }.
  3. Print the parse result.

Expected Behavior

The valid JSON Schema property object should deserialize successfully.

Actual Behavior

Deserialization fails because PropertySchema requires a local type field.

Additional Context

  • Authoritative spec: https://raw.githubusercontent.com/modelcontextprotocol/modelcontextprotocol/refs/heads/main/schema/2024-11-05/schema.ts
  • Code path: /Users/odeili/Projects/platform/cortex/src/cortex-mcp-types/src/tools.rs
  • Duplicate check on 2026-04-10:
  • cortex-mcp-types Tool inputSchema $ref property missing field type
  • tool inputSchema $ref missing field type cortex-mcp-types

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