Skip to main content
Glama

context_resolve

Read-only

Determine the entity for current work by ranking explicit signals over weak ones, returning a confidence score and indicating when to ask the user.

Instructions

Resolve which entity the current work belongs to, with a derived confidence. Deterministic — matches explicit signals (passed entity, named mention, active mission, files touched) before weak ones (lexical, single-active); never guesses from cwd. Returns entity_id + confidence + ask_user. Call this BEFORE focus_get/decision_check when the target entity is not already known, then pass the returned entity_id into them. Confidence >= 0.80: proceed silently. 0.50-0.79: proceed but say 'I think this is X'. < 0.50 (ask_user true): ask one short question.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_messageNoWhat the user said they want to do, verbatim. Strongest inferred signal.
files_touchedNoPaths being worked on. Matched by exact path segment against entity id/aliases — assists only, never overrides an explicit mention.
active_mission_idNoEntity id of the active approved mission/task, if any.
explicit_entity_idNoCaller-asserted entity id. Authoritative (confidence 1.0) when it matches a known entity.
Behavior5/5

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

Goes well beyond the readOnlyHint annotation by disclosing deterministic behavior, matching signal priority order, the explicit prohibition on guessing from cwd, return fields, and confidence-based decision flow. No contradictions with annotations.

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?

Dense but well-organized; every sentence contributes actionable detail—purpose, determinism, orchestration, and thresholds—with no filler or redundancy.

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

Completeness5/5

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

Compensates for the lack of an output schema by describing return fields, confidence thresholds, and required follow-up actions. For a read-only resolution tool, it is fully complete.

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

Parameters4/5

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

Schema covers all parameters with rich descriptions (100% coverage), so baseline is 3. The description adds signal-priority semantics (explicit vs weak) but does not substantially extend per-parameter details beyond the schema. This extra context justifies a 4.

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?

Clearly states it resolves which entity the current work belongs to with a derived confidence. It also distinguishes itself from sibling tools by referencing focus_get/decision_check and specifying when to call it.

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

Usage Guidelines5/5

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

Explicitly instructs to call before focus_get/decision_check when the target entity is not already known, and provides confidence thresholds for when to proceed silently, when to communicate uncertainty, and when to ask. This is concrete when-to-use guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/brainOS-HQ/brain-os'

If you have feedback or need assistance with the MCP directory API, please join our Discord server