Skip to main content
Glama
cortex-local-memory

cortex-local-memory

cortex_code_search

Search code and return file:line results, filtered by language or path, to locate a function or symbol definition quickly.

Instructions

Search code with file:line results. Filters by language or path, useful for locating a function or symbol definition.

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_code_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesSymbol name, function name or code keyword to find
top_kNoNumber of results (default 10)
languageNoFilter by language/extension, e.g. go, py, ts, js
path_likeNoOnly match file paths containing this substring
with_linesNoInclude line numbers when available

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.1

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral load; it discloses the return format (file:line) and that results can be filtered by language or path, which is genuinely useful. It is silent on ranking/relevance behavior, result limits beyond the default, and whether matching is keyword, regex, or semantic — gaps for a 5-parameter search tool.

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

Conciseness4/5

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

Two short sentences, front-loaded with the core action and result shape before the usage hint. Nothing is padded, though the second sentence could be tightened since it mixes purpose and usage in one clause.

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 read-only code search with a fully documented 5-parameter schema and no output schema, the description is nearly sufficient: it explains what comes back (file:line), how to narrow results, and the primary use case. It falls short only on match semantics and result ordering, which an agent would need for query formulation.

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's mention of language and path filtering and of line numbers loosely echoes language, path_like, and with_lines but adds no format or interaction details (e.g., whether path_like is case-sensitive or how language values are matched) beyond the schema.

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 ("Search code") and adds the distinctive result shape ("file:line results"), which lets an agent separate it from generic search siblings. It does not, however, name which sibling to prefer for non-code searches, so full differentiation is left implicit.

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?

Provides one positive usage cue ("useful for locating a function or symbol definition") but gives no when-not guidance, no mention of cortex_search or cortex_memory_search as alternatives, and no note on how to choose among the filter parameters. Usage is implied rather than prescribed.

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