Skip to main content
Glama

retrieve_context

Fetch your team's reviewed memory around a topic at session start so you inherit what teammates already learned, then drill into the returned index with fetch_nodes.

Instructions

Retrieve this team's reviewed memory around a topic.

Call once at the start of a session so you inherit what teammates already learned. anchor is the topic to search around. tags keeps only matching nodes; exclude_tags drops them instead.

Large neighbourhoods come back as an index (titles and per-node costs, no bodies) - follow with fetch_nodes for the ones worth reading.

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": {
      "anchor": "<anchor>"
    },
    "name": "retrieve_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
hopsNo
tagsNo
anchorYes
hub_cutoffNo
exclude_tagsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.6.0
    • addedInput schema / properties / exclude_tags
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Exclude Tags"
      +}
    • addedInput schema / properties / tags
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Tags"
      +}
  2. First observedv1.0.0

TDQS

A4/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 transparency burden. It does disclose a genuinely non-obvious behavior - large neighbourhoods return titles and per-node costs without bodies - but says nothing about permission/auth needs, result size limits, or what hops and hub_cutoff actually do to the traversal.

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?

Front-loaded with the purpose, then session timing, then per-parameter notes, then the fallback path. Every sentence carries information and the parameter explanations are compactly paired ('tags keeps only matching nodes; exclude_tags drops them instead').

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?

For a tool with no annotations and no output schema, the description supplies the essentials: when to call, how the filters compose, and what a large response looks like along with the next step. The remaining gap is the two undocumented integer traversal parameters, which is a real but bounded omission.

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 0%, so the description must explain all five parameters. It clarifies anchor, tags, and exclude_tags, but leaves hops (default 2) and hub_cutoff (default 15) entirely undefined, which are exactly the knobs that most change what comes back.

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 ('Retrieve this team's reviewed memory around a topic') and scopes it to a team corpus, which separates it from generic node-fetching siblings. The mention of 'reviewed' also signals a curated quality level an agent would not otherwise assume.

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?

Timing is explicit: 'Call once at the start of a session so you inherit what teammates already learned,' and the follow-up path is routed to fetch_nodes when results come back as an index. What is missing is a negative case, e.g. when not to call it or what to do instead mid-session.

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