Skip to main content
Glama

Context Pack

context_pack
Read-only

Generates a task-aware local context packet with primary files, related files, tests, and validation commands to help coding agents find the relevant repository scope for a query.

Instructions

Generate a task-aware local context packet with primary files, related files, tests, and validation commands. Deterministic by default; online:true also asks a read model for the request's intent and which candidate files it needs, reported under modelRead.

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": {
      "query": "<query>"
    },
    "name": "context_pack"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoGit ref whose tree to rank instead of the files on disk (e.g. origin/main). Omitted, a clean checkout that is behind its upstream is ranked against that upstream, and the result says so; a checkout with uncommitted changes is always ranked as it is.
pathNoRepository path. Defaults to the server's working directory; when editing in a git worktree, pass the worktree's path.
limitNoMaximum primary, related, and test files per section. Defaults to 8.
pathsNoRepository paths for a multi-repo context packet. Omitted, `path` plus the `companions` listed in its .solumberc.json.
queryYesTask or question to gather context for.
expandNoUse Claude to suggest extra search terms and consider one additional primary file. Requires ANTHROPIC_API_KEY. Defaults to false.
onlineNoAsk a read model (TypeSafe's Jev or Claude) for the request's intent and each candidate file's relevance, applying confident answers. Needs TYPESAFE_API_KEY or ANTHROPIC_API_KEY; without either the pack is unchanged. Defaults to false.
includeEvidenceNoInclude per-file imports, exports, and symbol slices as source evidence. Defaults to false to keep the packet compact.
includeMarkdownNoReturn a compact human-readable markdown report instead of the full JSON packet. Defaults to false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv4.14.0
    • addedInput schema / properties / expand
      Added value: +{
      +  "description": "Use Claude to suggest extra search terms and consider one additional primary file. Requires ANTHROPIC_API_KEY. Defaults to false.",
      +  "type": "boolean"
      +}
  2. Changed2 schema fields changedv4.13.0
    • changedInput schema / properties / path / description
      Previous value: -"Repository path. Defaults to current working directory."New value: +"Repository path. Defaults to the server's working directory; when editing in a git worktree, pass the worktree's path."
    • addedInput schema / properties / ref
      Added value: +{
      +  "description": "Git ref whose tree to rank instead of the files on disk (e.g. origin/main). Omitted, a clean checkout that is behind its upstream is ranked against that upstream, and the result says so; a checkout with uncommitted changes is always ranked as it is.",
      +  "type": "string"
      +}
  3. Changed1 schema field changedv4.10.0
    • changedInput schema / properties / online / description
      Previous value: -"Ask a read model (TypeSafe's Jev, or Claude through forced tool use) to read the request (intent, and relevance of each candidate file) in one call, and apply answers that clear their confidence gate. Needs TYPESAFE_API_KEY or ANTHROPIC_API_KEY (SOLUMBE_READ_PROVIDER picks one when both are set); without either the pack is returned unchanged with modelRead.source offline. Defaults to false."New value: +"Ask a read model (TypeSafe's Jev or Claude) for the request's intent and each candidate file's relevance, applying confident answers. Needs TYPESAFE_API_KEY or ANTHROPIC_API_KEY; without either the pack is unchanged. Defaults to false."
  4. Changed1 schema field changedv4.7.2
    • changedInput schema / properties / online / description
      Previous value: -"Ask TypeSafe's Jev to read the request (intent, and relevance of each candidate file) in one call, and apply answers that clear their confidence gate. Needs TYPESAFE_API_KEY; without one the pack is returned unchanged with modelRead.source offline. Defaults to false."New value: +"Ask a read model (TypeSafe's Jev, or Claude through forced tool use) to read the request (intent, and relevance of each candidate file) in one call, and apply answers that clear their confidence gate. Needs TYPESAFE_API_KEY or ANTHROPIC_API_KEY (SOLUMBE_READ_PROVIDER picks one when both are set); without either the pack is returned unchanged with modelRead.source offline. Defaults to false."
  5. Changed1 schema field changedv3.5.1
    • changedInput schema / properties / paths / description
      Previous value: -"Repository paths for a multi-repo context packet. Omitted, `path` plus the `companions` listed in its .otitorc.json."New value: +"Repository paths for a multi-repo context packet. Omitted, `path` plus the `companions` listed in its .solumberc.json."
  6. Changed1 schema field changedv3.5.0
    • changedInput schema / properties / paths / description
      Previous value: -"Repository paths for a multi-repo context packet."New value: +"Repository paths for a multi-repo context packet. Omitted, `path` plus the `companions` listed in its .otitorc.json."
  7. Changed1 schema field changedv1.14.1
    • addedInput schema / properties / online
      Added value: +{
      +  "description": "Ask TypeSafe's Jev to read the request (intent, and relevance of each candidate file) in one call, and apply answers that clear their confidence gate. Needs TYPESAFE_API_KEY; without one the pack is returned unchanged with modelRead.source offline. Defaults to false.",
      +  "type": "boolean"
      +}
  8. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the network-access bar is partly pre-set. The description adds genuinely new behavioral context: default runs are deterministic, online:true invokes a read model for intent and candidate-file relevance, and those results are surfaced under modelRead — telling the agent where the model-derived data lands. It stops short of noting cost/latency for the online path.

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?

Two sentences, no filler, and the core output description is front-loaded before the default/opt-in behavior. Every clause carries information an agent can act on.

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 nine parameters fully documented in the schema and no output schema, the description needs to convey output shape and the deterministic-vs-online distinction — both are covered, including the modelRead field. Minor gap: the relationship among path, paths, and ref when combined is left to the schema alone.

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 coverage is 100%, so the baseline is 3; the description earns that by explaining what the online flag produces and where (modelRead) rather than merely restating it. It does not add semantics for ref, paths, expand, or includeEvidence beyond what the schema already spells out.

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

Purpose4/5

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

States a specific verb and resource: 'Generate a task-aware local context packet' and enumerates exactly what the packet contains (primary files, related files, tests, validation commands). This is clearly distinct from repo_search or repo_index style siblings, though it never names an alternative tool explicitly.

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

Usage Guidelines3/5

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

The description implies usage ('task-aware', 'deterministic by default') and explains the online:true branch, but never says when an agent should pick this over review_context or repo_search, nor any prerequisites beyond what the schema already declares for flags. Guidance is implied rather than stated.

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