Skip to content

Enforce use of the "tree" parameter to reduce response size.#1

Merged
kleincode merged 1 commit into
mainfrom
enforce-tree-parameter
May 29, 2026
Merged

Enforce use of the "tree" parameter to reduce response size.#1
kleincode merged 1 commit into
mainfrom
enforce-tree-parameter

Conversation

@kleincode

Copy link
Copy Markdown
Collaborator

Currently, responses to most read-only tools are ridiculously large. To reduce response size, the optional "tree" parameter allows filtering the JSON response. However, this parameter is not used by the agent if not explicitly told so.

This PR marks the "tree" parameter as mandatory instead of optional, explains the purpose to the agent and gives an example.

@kleincode kleincode self-assigned this May 29, 2026
Copilot AI review requested due to automatic review settings May 29, 2026 16:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the MCP tool input schema generation so that tools which support Jenkins “tree” pruning explicitly require a tree argument, guiding callers to use field selection to reduce oversized JSON responses.

Changes:

  • Updates the tree parameter description to clearly explain purpose and provide an example.
  • Marks tree as a required input field (for tools where tree pruning is supported).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kleincode kleincode changed the title Enfore use of the "tree" parameter to reduce response size. Enforce use of the "tree" parameter to reduce response size. May 29, 2026
@kleincode kleincode merged commit 5938900 into main May 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants