Skip to main content
Glama
parh0m2007

localscope-mcp

by parh0m2007

Search code semantically

localscope_search
Read-onlyIdempotent

Search local code or docs by meaning, symbol, or fragment to find where a feature is implemented. Returns file, line range, snippet, and match type.

Instructions

Search the local index for code or docs by meaning, symbol name, or fragment. Combines embeddings (if installed) with lexical identifier matching — all offline.

Args:

  • query (string): what to find, e.g. "retry with backoff", "parseConfig", "where do we validate webhooks"

  • path (string): repo root previously indexed, default "."

  • limit (number): max results 1-100, default 20

  • response_format ('markdown' | 'json'): default 'markdown'

Returns: Hits with file, line range, symbol, score, snippet, and how it matched (semantic/lexical/symbol).

Use when: "where is X handled?", "find code that does Y". Requires localscope_index first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoRepository path (must match a previously indexed root).
limitNoMaximum results to return
queryYesNatural-language query, symbol name, or code fragment to find
response_formatNoOutput format: 'markdown' for human-readable or 'json' for machine-readablemarkdown

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive behavior. The description adds value beyond these annotations by disclosing offline execution, conditional embedding use, and the hybrid semantic/lexical matching mechanism. It leaves some edge cases unspecified, such as behavior when the index is stale, but it neither contradicts the annotations nor omits the core safety profile.

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 efficient and well organized: a one-sentence purpose, then compact Args/Returns/Use-when sections. It also front-loads the meaningful distinction from the title and siblings. No sentence is filler, and the 'Use when' pattern makes the tool immediately actionable.

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?

Because there is no output schema, the description properly compensates by specifying the return shape: file, line range, symbol, score, snippet, and match type. It also states the prerequisite index, the offline constraint, and both supported response formats. For a read-only search tool, this is enough for correct invocation.

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?

The schema has 100% parameter description coverage, so the structured fields document each argument. The description adds a few example values for query ('retry with backoff', 'parseConfig') and restates defaults, but most of its parameter information duplicates the schema. This is a reasonable baseline, not an exceptional contribution.

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 opens with a specific verb and resource: 'Search the local index for code or docs by meaning, symbol name, or fragment.' It also distinguishes itself from siblings by explaining it combines embeddings with lexical identifier matching, while tool names like localscope_index, localscope_impact, and localscope_status clearly cover different operations.

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?

The description provides concrete usage triggers ('Use when: ...') and the critical prerequisite 'Requires localscope_index first,' plus illustrative query patterns. It does not explicitly exclude sibling tools, such as advising when localscope_impact would be preferable, but it gives enough context for selection in most cases.

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