Bug Report: Agent Auto Mode MCP Tool Type Handling Issues
Summary
The Cursor IDE’s Agent Auto Mode is experiencing two critical issues with MCP tool type handling:
-
Incorrect type generation for tool arguments
-
Improper JSON schema type validation
Environment
-
IDE: Cursor 0.49.2 (but also lower versions)
-
Feature: Agent “Auto” Mode with MCP tools
Issue Description
Problem 1: Incorrect Type Generation
In Agent Auto Mode, when using some MCP Server tools, the system incorrectly generates string values for parameters that should be integers. For example (see schema below), the limit
parameter, which is defined as an integer in the JSON schema, is being generated as a string.
Tool Schema:
{
"name": "ACI_SEARCH_FUNCTIONS",
"description": "This function allows you to find relevant executable functions and their schemas that can help complete your tasks.",
"input_schema": {
"type": "object",
"properties": {
"intent": {
"type": "string",
"description": "Use this to find relevant functions you might need. Returned results of this "
"function will be sorted by relevance to the intent.",
},
"limit": {
"type": "integer",
"default": 100,
"description": "The maximum number of functions to return from the search per response.",
"minimum": 1,
},
"offset": {
"type": "integer",
"default": 0,
"minimum": 0,
"description": "Pagination offset.",
},
},
"required": [],
"additionalProperties": False,
},
}
Screenshot of the Issue:
Problem 2: JSON Schema Type Validation Issues
The type validation system exhibits multiple problems:
-
When I change the type of “limit” to
["integer", "string"]
(accepting both types), Cursor still generates type errors, specifically complaining that it “expected type ‘integer,string’ but got string” -
When the type definition of “limit” is completely removed from the JSON schema, the validation system fails with the error “expected type undefined but got string”.
Impact
These issues prevent proper tool execution in Agent Auto Mode and create confusion in the type validation system, making it difficult to work with some MCP tools that require specific parameter types.
Expected Behavior
-
Agent Auto Mode should generate the correct parameter types as defined in the JSON schema
-
The type validation system should properly handle:
-
Single type definitions (e.g., “integer”)
-
Union types (e.g., [“integer”, “string”])
-
Undefined types (when type is not specified in schema)
To Reproduce
Please use below config (need to specify version 1.0.0.b1 because we had to remove “limit” field in our latest version due to this bug):
{
"mcpServers": {
"aci-mcp-unified": {
"command": "uvx",
"args": ["[email protected]", "unified-server", "--linked-account-owner-id", "aipolabs", "--allowed-apps-only"],
"env": {
"ACI_API_KEY": "ea136d8022d45c972c89033fe5d0e08d3affa66b36f7d6673326f0b4937d308b"
}
}
}
}
(Or try it with a mock MCP server with a schema)
Thanks!