Skip to content

fix(codersdk/toolsdk): fix tool schemata #17365

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 11, 2025
Merged

fix(codersdk/toolsdk): fix tool schemata #17365

merged 2 commits into from
Apr 11, 2025

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Apr 11, 2025

Fixes two issues with the MCP server:

  • Ensures we have a non-null schema, as the following schema was making claude-code unhappy:
        "inputSchema": { "type": "object", "properties": null },
  • Skip adding the coder_report_task tool if an agent client is not available. Otherwise the agent may try to report tasks and get confused.

@johnstcn johnstcn added the hotfix PRs only. Harmless small change. Only humans may set this. label Apr 11, 2025
Copy link

@cdr-bot cdr-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is a hotfix and has been automatically approved.

  • ✅ Base is main or release branch
  • ✅ Has hotfix label
  • ✅ Head is from coder/coder
  • ✅ Less than 100 lines

@johnstcn johnstcn merged commit 7b0422b into main Apr 11, 2025
40 checks passed
@johnstcn johnstcn deleted the cj/mcp/fix-schema branch April 11, 2025 17:58
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2025
@@ -259,6 +259,10 @@ is provisioned correctly and the agent can connect to the control plane.
Tool: aisdk.Tool{
Name: "coder_list_templates",
Description: "Lists templates for the authenticated user.",
Schema: aisdk.Schema{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A NewSchema function or a builder in aisdk might be a good idea.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
hotfix PRs only. Harmless small change. Only humans may set this.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants