What this thread does
[object Object] in a generated mcp-use query filter calls for an explicit HTTP serializer that follows the parameter's style and explode contract.
The tool can accept a structured object and return success while the upstream API receives a corrupted filter. Do first: npm ls mcp-use. Evidence: issue #2948 documents this symptom; PR #2949 remains open, so it establishes a proposed correction rather than a released fix. Not for: FastMCP's OpenAPI 3.1.2 schema-loading failure; see the FastMCP thread.
What changed
- As of November 2026: this is a workaround for the TypeScript v2 adapter described in the October 26 report. The October changelog and 2.12.3 release do not establish a serialization fix.
- In the adapter implementation, arrays become repeated keys; other values go through
String(value). The call to the helper passes the name and value, without the parameter's serialization settings. Merely addingexplode: falseto the spec cannot change that implementation.
Do first: inspect one outgoing query
1. Record npm ls mcp-use and find the affected operation's in: query parameters in the OpenAPI document. 2. Send an array and an object to a harmless read operation backed by a request-recording endpoint. Inspect the actual URL, not only the generated input schema or isError value. 3. Compare decoded query values with the OpenAPI 3.0.3 serialization examples. For a parameter named filter, these are different contracts:
| Input | Style / explode | Expected query meaning |
|---|---|---|
["red", "blue"] | form / true | filter=red&filter=blue |
["red", "blue"] | form / false | filter=red,blue |
{"color":"red","size":3} | form / true | color=red&size=3 |
{"color":"red","size":3} | form / false | filter=color,red,size,3 |
{"color":"red","size":3} | deepObject / true | filter[color]=red&filter[size]=3 |
4. If the URL differs, exclude that generated operation and register a purpose-built tool with explicit HTTP encoding. The OpenAPI guide documents exclude, including an operation rule such as exclude: [{ operationId: "listItems" }]. Keep the remaining generated operations only after checking their contracts. 5. In that tool's HTTP adapter, a flat form object with explode: true can be encoded explicitly:
const url = new URL("https://api.example.com/items");
const filter = { color: "red", size: 3 };
for (const [name, value] of Object.entries(filter)) {
url.searchParams.append(name, String(value));
}
This example implements only the third table row. A deepObject adapter must retain the outer parameter name in bracketed keys; a non-exploded array needs one joined value. Treat these as separate branches, with recorded-URL assertions for each contract.
Diagnostic: filter=%5Bobject+Object%5D
This is the encoded query from #2948. The MCP tool schema accepting an object does not establish that the subsequent HTTP request preserves it. Repeated array keys are correct for form / explode: true, but do not establish support for other combinations. Report, implementation.
Evidence
On October 26, 2026, akshatcoder-hash reported an object filter arriving as a string while the tool returned isError: false. On October 26, ahmet-izgi proposed default object-query and header serialization in PR #2949; its scope does not establish every OpenAPI style/explode combination.
Limits
The workaround is for flat primitive-valued query data; nested objects, arrays of objects, reserved-character policy and header serialization need their own contracts. An HTTP 200 response alone cannot demonstrate correct filtering.
Started from a post by @akshatcoder-hash, packaged by the editor. Original post