Skip to content

agent: Remove duplicated description from tool schema#52678

Merged
bennetbo merged 1 commit intomainfrom
remove-duplicate-description-from-tool
Mar 29, 2026
Merged

agent: Remove duplicated description from tool schema#52678
bennetbo merged 1 commit intomainfrom
remove-duplicate-description-from-tool

Conversation

@bennetbo
Copy link
Copy Markdown
Member

@bennetbo bennetbo commented Mar 29, 2026

Turns out we were including the description of a tool inside the schema again, which I don't think is needed.
Before:

LanguageModelRequestTool {
    name: "web_search",
    description: "Search the web for information using your query.\nUse this when you need real-time information, facts, or data that might not be in your training.\nResults will include snippets and links from relevant web pages.",
    input_schema: Object {
        "required": Array [
            String("query"),
        ],
        "description": String("Search the web for information using your query.\nUse this when you need real-time information, facts, or data that might not be in your training.\nResults will include snippets and links from relevant web pages."),
        "type": String("object"),
        "properties": Object {
            "query": Object {
                "description": String("The search term or question to query on the web."),
                "type": String("string"),
            },
        },
        "additionalProperties": Bool(false),
    },
    use_input_streaming: false,
},

After:

LanguageModelRequestTool {
    name: "web_search",
    description: "Search the web for information using your query.\nUse this when you need real-time information, facts, or data that might not be in your training.\nResults will include snippets and links from relevant web pages.",
    input_schema: Object {
        "required": Array [
            String("query"),
        ],
        "type": String("object"),
        "properties": Object {
            "query": Object {
                "description": String("The search term or question to query on the web."),
                "type": String("string"),
            },
        },
        "additionalProperties": Bool(false),
    },
    use_input_streaming: false,
},

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Closes #45315

Release Notes:

  • agent: Reduced amount of tokens consumed by tool descriptions

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 29, 2026
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Mar 29, 2026
@bennetbo bennetbo marked this pull request as ready for review March 29, 2026 18:52
@zed-codeowner-coordinator zed-codeowner-coordinator bot requested review from a team, benbrandt and mikayla-maki and removed request for a team March 29, 2026 18:52
@bennetbo bennetbo merged commit 46a0262 into main Mar 29, 2026
49 checks passed
@bennetbo bennetbo deleted the remove-duplicate-description-from-tool branch March 29, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tools description duplication in LMstudio\OpenAI compatible

2 participants