Skip to main content
Glama

get_relevant_context

Retrieve past intents and decisions relevant to a user request by providing the prompt and active files, enabling informed approach without dumping all recent activity.

Instructions

Find past intents and decisions relevant to the current user request.

When to use:

  • After you have done a quick initial exploration of the user's request and know which files are involved. Calling earlier with only a vague prompt gives weak results.

  • To pull task-specific context instead of dumping all recent activity — preferred for large projects.

Inputs of note:

  • prompt: the user request, in their words or your paraphrase.

  • activeFiles (recommended): files you have identified as relevant to the request. Significantly improves relevance.

  • maxIntents, maxDecisions, minRelevance: result-shaping caps and threshold.

Returns:

  • relevantIntents: past work units (intents) related to the task, scored by relevance.

  • relevantDecisions: prior decisions related to the task — both intent-scoped and repo-scoped. Summary-only (no inline rationale, to keep context lean); call get_decision_detail(decisionId) for the full rationale/context/consequences of any decision you want to open.

Recommended sequence:

  1. check_active_intent at session start to resume any existing work.

  2. Briefly explore the user's request to identify involved files.

  3. get_relevant_context with the prompt and activeFiles to inform the approach.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesThe user request to find relevant context for
repoPathYesLocal path to the repository root
forkAuthorNoFork attribution; usually resolved by Muninn automatically — pass only for override / testing.
maxIntentsNoMaximum number of intents to return
repoOriginNoGit remote origin URL. Auto-detected from repoPath via git if not provided.
activeFilesNoFiles currently being discussed or recently opened
workspaceIdNoWorkspace identifier; usually resolved by Muninn automatically — pass only for override / testing.
maxDecisionsNoMaximum number of decisions to return
minRelevanceNoMinimum relevance score (0-1)
Behavior5/5

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

With no annotations, the description fully bears the burden of transparency. It discloses that results include relevantIntents and relevantDecisions, that decisions are summary-only, and that full details require calling get_decision_detail. It also notes that forkAuthor and workspaceId are usually auto-resolved, and that calling early with vague prompts yields weak results. No contradictions with annotations (none exist).

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?

The description is well-structured with clear sections: purpose, when to use, inputs of note, returns, and recommended sequence. Every sentence adds necessary information without redundancy. It is front-loaded with the core purpose and efficiently expands on usage and details. No wasted words.

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?

The description is comprehensive for a tool with 9 parameters and no output schema. It covers the tool's purpose, usage context, key inputs (especially activeFiles), return fields with guidance on how to use them (e.g., calling get_decision_detail for full rationale), and a recommended sequence linking to sibling tools. It provides enough context for an agent to correctly select and invoke the tool.

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

Parameters5/5

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

Despite 100% schema coverage, the description adds significant value beyond the schema: it explains that activeFiles is recommended and improves relevance, that forkAuthor and workspaceId are for override/testing only, and it describes the return fields and their nature (summary-only decisions). It also provides a recommended sequence that clarifies parameter usage context.

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 clearly states the tool's purpose: 'Find past intents and decisions relevant to the current user request.' It uses a specific verb ('Find') and identifies the resources ('past intents and decisions'). It distinguishes itself from sibling tools like get_intents_for_file by focusing on task-specific context and recommending use after initial exploration.

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?

The description explicitly details when to use the tool: after initial exploration when files are known, and for task-specific context in large projects. It provides a recommended sequence involving check_active_intent and exploration first. It also advises against calling too early with a vague prompt, effectively telling when not to use it, and contrasts with other tools by stating its preference for large projects.

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/CodeAwareness/kawa.mcp'

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