Skip to main content
Glama
parh0m2007

localscope-mcp

by parh0m2007

Index repository locally

localscope_index
Read-onlyIdempotent

Index a repository locally to enable offline code analysis: scans files, symbols, and import graph with no network calls, keeping all data on your machine.

Instructions

Build a local, private index of a repository: files, symbols (functions/classes/types), import graph, and optional embeddings. Zero network calls — the index never leaves the machine.

Args:

  • path (string): repository root, default "."

  • max_files (number): safety cap, default 50000

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

Returns: File/chunk/symbol counts, embedder mode (onnx or lexical), duration.

Use when: the user asks to index/analyze the codebase, or before localscope_search / localscope_impact on a repo not indexed yet in this session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoRepository path to index (absolute, or relative to the directory the server was started in).
max_filesNoSafety cap on number of files to index
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

A3.8/5.0
Behavior1/5

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

Annotation contradiction: readOnlyHint=true conflicts with the description's claim that the tool 'builds' an index, which implies a state-changing operation. The description does add useful offline/privacy context, but the contradiction misleads an agent about whether this tool has side effects.

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 and compact: core purpose and privacy stance are front-loaded, followed by labeled Args, Returns, and Use when sections. Every part earns its place, and the Returns section compensates for the absence of an output schema.

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 only optional parameters and no output schema, the description covers purpose, parameters, return values, usage conditions, and privacy/network behavior. The main gap is that it does not clarify index persistence or re-indexing behavior, but the definition is otherwise sufficiently complete.

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 input schema describes all three parameters with defaults, ranges, and enum values, so schema coverage is 100%. The description's Args section mostly restates the same information without adding meaningful semantic detail beyond the schema.

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 action: 'Build a local, private index of a repository' and enumerates what it indexes (files, symbols, import graph, embeddings). This differentiates it sharply from sibling tools like localscope_search and localscope_impact.

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 'Use when' section explicitly says to use this tool when the user asks to index/analyze the codebase, and before localscope_search / localscope_impact on a repo not indexed yet. This provides concrete conditions and names sibling tools, making the choice unambiguous.

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