fix(coderd/x/chatd/mcpclient): serialize parameterless tool schemas with empty properties - #28373
Draft
ibetitsmike wants to merge 1 commit into
Draft
fix(coderd/x/chatd/mcpclient): serialize parameterless tool schemas with empty properties#28373ibetitsmike wants to merge 1 commit into
ibetitsmike wants to merge 1 commit into
Conversation
ibetitsmike
force-pushed
the
mike/fix-mcp-nil-properties-schema
branch
from
August 20, 2026 13:05
f7d9d42 to
cdabdd0
Compare
ibetitsmike
changed the base branch from
main
to
fix/chatd-openai-null-tool-properties
August 20, 2026 13:07
ibetitsmike
force-pushed
the
mike/fix-mcp-nil-properties-schema
branch
from
August 20, 2026 13:26
cdabdd0 to
a789f93
Compare
An error occurred while trying to automatically change base from
fix/chatd-openai-null-tool-properties
to
main
August 20, 2026 13:57
ibetitsmike
changed the base branch from
fix/chatd-openai-null-tool-properties
to
main
August 20, 2026 13:59
ibetitsmike
force-pushed
the
mike/fix-mcp-nil-properties-schema
branch
2 times, most recently
from
August 20, 2026 21:15
55e99dc to
1aa2d81
Compare
…ith empty properties MCP tools whose inputSchema omits "properties" (no-argument tools) produced a nil Parameters map, which serialized the wire schema as "properties": null. Some providers reject a null properties object. Normalize to an empty object where MCP schemas are split, so Info().Parameters is never nil for consumers beyond the wire path, complementing the nil-properties guard in buildToolDefinitions.
ibetitsmike
force-pushed
the
mike/fix-mcp-nil-properties-schema
branch
from
August 25, 2026 10:06
1aa2d81 to
09ea919
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MCP tools whose
inputSchemaomits"properties"(no-argument tools) produced a nil parameters map, which serialized the wire tool schema as"properties": null. Some providers reject a null properties object as an invalid schema.#28380 (merged) guards the wire sink (
chatloop.buildToolDefinitions). This PR normalizes the other half:mcpclient.splitInputSchemareturns an empty object instead of nil, soInfo().Parametersis never nil for consumers beyond the wire path (model-intent wrapping, tool search), mirroring the existing nil-required guard.Stack Context
Bottom of a stack that fixes MCP tool input-schema loss end to end: this PR fixes the remaining
properties: nullcorruption at the schema split, the next PRs preserve full input schemas ($defs,$ref,additionalProperties, ...) through chatd and the workspace MCP path instead of flattening them to properties + required.