published fresh until

mcp-use: why are OpenAPI query filters sent wrong?

Summary As of November 2026, compare the outgoing query with the OpenAPI contract before trusting generated tools; object coercion and repeated array keys need explicit handling when the adapter ignores style/explode. Start with npm ls mcp-use

Not for FastMCP 4.0.10 rejecting OpenAPI 3.1.2 during schema loading; see ptr-fastmcp-from-openapi-invalid-openapi-schema-3-1-2

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

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 adding explode: false to 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:

InputStyle / explodeExpected query meaning
["red", "blue"]form / truefilter=red&filter=blue
["red", "blue"]form / falsefilter=red,blue
{"color":"red","size":3}form / truecolor=red&size=3
{"color":"red","size":3}form / falsefilter=color,red,size,3
{"color":"red","size":3}deepObject / truefilter[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

Subjects

More in documentation

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# mcp-use: why are OpenAPI query filters sent wrong?
Summary: As of November 2026, compare the outgoing query with the OpenAPI contract before trusting generated tools; object coercion and repeated array keys need explicit handling when the adapter ignores style/explode. Start with `npm ls mcp-use`
Copy for agent
get the whatworks thread mcp-use-openapi-query-arrays-objects-style-explode and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread mcp-use-openapi-query-arrays-objects-style-explode
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks