Skip to main content
Glama
cortex-local-memory

cortex-local-memory

cortex_context

Assembles relevant notes and code snippets from local memory within a strict token budget, so coding agents can retrieve ranked context for a query without exceeding limits.

Instructions

Assemble relevant information within a specific token budget limit strictly

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": "cortex_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesThe query to build context upon
token_budgetNoAllowed max tokens

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.1

TDQS

C2.5/5.0
Behavior2/5

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

With no annotations, the description carries the full burden and delivers little: no statement that this is a read-only operation, no indication of cost or latency, no mention of what the returned context looks like or how relevance is ranked. Only the strict budget enforcement is disclosed, which is the one behavioral fact an agent can act on.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One short sentence with no padding, which is efficient, but the trailing "strictly" is syntactically vague about what it modifies and the sentence front-loads a constraint instead of the tool's core function. It is brief without being informative.

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

Completeness2/5

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

A context-assembly tool with no annotations, no output schema, and an underspecified data source leaves real gaps: the agent does not know what gets assembled, whether results are truncated silently, or whether a read-only guarantee applies. Given the tool's centrality, the definition should say considerably more.

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% for both parameters, so the baseline is 3. The word "strictly" does add one nuance beyond the schema — that token_budget is hard-capped rather than advisory — but nothing clarifies query semantics or what happens when the budget is too small to fit results.

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

Purpose3/5

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

The description gives a verb ("Assemble") and a resource ("relevant information"), plus a constraint (token budget), but "relevant information" is undefined — it never says what corpus is drawn from (memory, code, project files). Against siblings like cortex_search, cortex_memory_search, and cortex_project_context, an agent cannot tell what this tool retrieves or how it differs.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no when-not-to-use, and no named alternative. The word "strictly" hints at budget enforcement as a reason to pick this tool, but the agent must infer that; nothing explicitly says to prefer this over cortex_search or cortex_project_context when a token cap matters.

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