Skip to main content
Glama
mcp-context-budget

mcp-context-budget

by yuehancn

rank_servers_by_cost

Rank installed MCP servers by context cost to identify which server to remove first, without generating a full budget report.

Instructions

Rank installed MCP servers by context cost without a full report. Answers 'which server should I remove first'. Cheaper and faster than audit_context_budget. Read-only.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "rank_servers_by_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNoHow many servers to list.
windowNo200k

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden. It usefully discloses that the tool is read-only and cheaper/faster than audit_context_budget, but it does not explain ranking order, cost calculation, or return format.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the core purpose and followed by the use case and alternative. There is no wasted wording.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter read-only tool, the description covers purpose and usage well. However, it leaves the 'window' parameter and the ranking output shape unexplained, which are meaningful gaps given the lack of an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description does not mention either parameter. The schema documents 'top' but leaves the 'window' enum unexplained, and the description does not compensate by clarifying what the context window means or how it affects ranking.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: rank installed MCP servers by context cost. It also gives a concrete use case, 'which server should I remove first,' and distinguishes itself from audit_context_budget by being a lighter-weight alternative.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It clearly frames the tool as a faster, cheaper option when a full report is unnecessary, and it names audit_context_budget as the heavier alternative. The guidance is strong but stops short of explicitly stating when to prefer audit_context_budget or explain_token_cost.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.