Skip to main content
Glama

Get context plan

swarm_get_context_plan
Read-onlyIdempotent

Preview which authorized Space resources fit a proposed prompt before sending it to an agent. Supply composer_text; explicit references are required inputs that must fit token_budget. Returns selection, coverage and source revision without saving content or calling a model. Use swarm_preview_handoff for cited Markdown from selected sources.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "composer_text": "<composer_text>"
    },
    "name": "swarm_get_context_plan"
  }
}

Input Schema

NameRequiredDescriptionDefault
space_idNoSpace ID from swarm_list_spaces; omit if sole.
objectiveNoPurpose guiding context selection within your access.
token_budgetNoApproximate token ceiling, 1-32000; default 4000. Explicit sources must fit or the preview fails.
composer_textYesPrompt to plan context for; never submitted for execution.
explicit_resource_refsNoRequired references, such as artifact:<id>, from authorized reads.
observed_source_revisionNosource_revision from the latest preview; stale publishing fails.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / composer_text / description
      Added value: +"Prompt to plan context for; never submitted for execution."
    • addedInput schema / properties / explicit_resource_refs / description
      Added value: +"Required references, such as artifact:<id>, from authorized reads."
    • addedInput schema / properties / objective / description
      Added value: +"Purpose guiding context selection within your access."
    • addedInput schema / properties / observed_source_revision / description
      Added value: +"source_revision from the latest preview; stale publishing fails."
    • changedInput schema / properties / space_id / description
      Previous value: -"Omit for a single approved Space."New value: +"Space ID from swarm_list_spaces; omit if sole."
    • addedInput schema / properties / token_budget / description
      Added value: +"Approximate token ceiling, 1-32000; default 4000. Explicit sources must fit or the preview fails."
  2. Changed1 schema field changed
    • addedInput schema / properties / space_id / description
      Added value: +"Omit for a single approved Space."
  3. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world. The description adds value beyond that: it discloses that content is not saved and no model is called, and that explicit references must fit token_budget or the preview fails — a failure mode worth knowing. It does not mention authorization/permission failure behavior or rate limits.

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 tight sentences: purpose first, then the required input and constraint, then the return/side-effect profile, then the sibling handoff. Every sentence carries information an agent needs and nothing is wasted.

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

Completeness4/5

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

With an output schema present and full schema coverage, the description need not explain return fields, yet it still summarizes them (selection, coverage, source revision). Annotations cover safety; the description covers the side-effect-free nature and the token-budget failure condition. Only authorization caveats for 'authorized Space resources' are left implicit.

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

Parameters3/5

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

Schema description coverage is 100%, so all six parameters are already documented in the schema, including the token_budget constraint and the stale-preview failure on observed_source_revision. The description's parameter content ('supply composer_text', 'explicit references must fit token_budget') largely restates the schema, so the baseline of 3 applies.

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?

States a specific verb and resource — 'Preview which authorized Space resources fit a proposed prompt' — with scope qualifiers (authorized Space, before sending to an agent). It is unmistakable against siblings like swarm_preview_handoff or swarm_get_space since it names the dry-run planning step explicitly.

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?

Gives clear usage context ('before sending it to an agent') and routes the agent to swarm_preview_handoff for cited Markdown from selected sources. It stops short of stating explicit exclusions or prerequisites (e.g., required read authorization), so it is slightly below full guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.