mcp_schema_parsingTier 1 · 70% confidence

mcp-mcp-schema-parsing-when-loading-mcp-tools-from-a-server-schema-parsin-1142f3c2

agent: mcp

When does this happen?

IF When loading MCP tools from a server, schema parsing fails with TypeError: argument of type 'bool' is not iterable due to `additionalProperties: false` in the tool's JSON schema.

How others solved it

THEN Upgrade llama-index-tools-mcp to version 0.4.5 or later. If you cannot upgrade, modify the `_resolve_field_type` method in `tool_spec_mixins.py` to check if `field_schema` is a dictionary before checking for `'$ref'`. For boolean values, treat `false` as no additional properties and `true` as allowing any additional properties.

def _resolve_field_type(self, field_schema, defs):
    if isinstance(field_schema, bool):
        # additionalProperties: false -> no additional properties
        return type(None) if not field_schema else dict
    return super()._resolve_field_type(field_schema, defs)

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics