Skip to main content

MCP: Reduce token-heavy outputs + document tool output format

MCP tools can be inefficient with token usage. For example, List Resources may return extremely large outputs (hundreds of thousands of characters / thousands of lines), exceeding model tool limits and causing agents to resort to brittle grepping/jq workarounds.

Please introduce more token-safe defaults (pagination/limits/filtered output) and improve documentation explaining the tool output format so this doesn’t happen.

Example: Listing resources could return a small summary by default instead of 14k+ lines.

Status: ⬆️ Gathering votes3 comments

Log in to comment and vote

Comments3

  • Violet Highlighter

    •

    Mar 12

    I wrote a PR to implement spacectl api <your query here>:

    https://github.com/spacelift-io/spacectl/pull/391

  • Apricot Astronaut

    •

    Feb 24

    •

    Merged request

    •

    1 vote

    MCP: Provide agent-friendly way to run generic GraphQL API calls

    The MCP server could be expanded to provide agents with a simple, reliable way to make API calls. |

    Today, when an operation isn’t supported by spacectl, agents tend to fall back to using curl, which is error-prone and brittle in automation workflows. Adding an MCP tool to wrap generic GraphQL queries/mutations (or providing clear documentation describing how to perform GraphQL operations reliably) would improve agent-based usage and reduce reliance on ad-hoc API calls.

    Example: Fetch stack by ID / list runs with filters via GraphQL without using curl.

  • Black Breeze

    •

    Feb 24

    Thanks for taking the time to explain the challenge, Justyna. There are things in the MCP protocol and practice that can still be improved. It remains unclear to me whether this responsibility is on Spacelift, on the protocol authors, or shared.

    But regardless, I am going to park this temporarily for a month or so until we have a chance to see whether what we’re about to launch addresses the root problem.