Skip to main content
Glama
Doublehead

codegraph

by Doublehead

scope

Set indexing scope by excluding vendor trees or including specific directories. Use a dry run to preview suggested exclusions before applying.

Instructions

Scope which files codegraph indexes for this project, then force-reindex. On a big vendor monorepo this is the highest-leverage action - and it's YOURS to do for the user, not theirs. Pass exclude to drop vendor trees (recommended: keeps ALL the user's code, auto-includes anything they add later) or include to index ONLY listed dirs. Globs are relative to the project root; * spans directories (e.g. "wp-content/plugins/woocommerce/*"). Merges with any existing config and writes /.codegraph/config.json. Apply an index() scope_suggestion straight through here. Returns the new config + post-scope stats.

Call with NO include/exclude for an instant DRY RUN: a suggested exclude list derived from the directory layout (no indexing) - so you can scope a huge repo BEFORE paying for a full index, then apply it. Returns {"dry_run": True, "suggested_exclude": [...], "current": ...}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rootNo.
excludeNo
includeNo
Behavior5/5

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

No annotations are provided, so the description fully bears the burden. It details the behavior: force-reindex, config merging, file writing, and the dry-run result format. This gives the agent a clear understanding of side effects and outputs.

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?

The description is longer but every sentence adds value. It is front-loaded with the core purpose. Minor trimming could be possible, but it remains clear and well-structured.

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?

Given no output schema, the description covers return values thoroughly: new config + post-scope stats for normal calls, and a dry-run object with suggested excludes. All edge cases (dry-run, merging) are addressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite the input schema having 0% description coverage, the description compensates completely. It explains the 'exclude' parameter (drop vendor trees, recommended), 'include' (index only listed dirs), glob syntax, and the default behavior of no arguments triggering a dry run.

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 explicitly states the tool's purpose: 'Scope which files codegraph indexes for this project, then force-reindex.' It clearly distinguishes the tool from siblings like 'stats', 'pending', and 'hooks' by focusing on scoping and reindexing.

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?

Provides explicit guidance on when to use (on a big vendor monorepo), what parameters to pass (exclude vs include), and includes a dry-run feature. It also notes that merging with existing config and writing to a config file occurs.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Doublehead/codegraph'

If you have feedback or need assistance with the MCP directory API, please join our Discord server