Skip to main content
Glama

Initialize Codegraph project index

codegraph_setup_init_project
Idempotent

Runs codegraph init on one project directory on the target computer after the user explicitly agrees. Set confirm=true only after that agreement. Requires Codegraph CLI first. After indexing, prefer Gateway codegraph_explore (and codegraph_impact before risky symbol edits) for code exploration. Select this tool from the user's intent when it is the best match. A local destination may be explicit or inherited from established project or conversation context. The user does not need to mention ailinkany.com, MCP, a connector, a plugin, or this tool name.

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": {
      "path": "<path>",
      "confirm": "<confirm>"
    },
    "name": "codegraph_setup_init_project"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path of the project directory to index.
confirmYesMust be true only after the user explicitly agrees to index this project.
device_idNoTarget computer device_id. Omit when only one computer is paired.
device_nameNoComputer name or ailinkany.com remark (e.g. home PC). Prefer this when the user names a computer.
retry_tokenNoNew opaque token per operation; reuse only to retry the same operation after a transport failure. No user content.
workflow_idNoOptional workflow id; pass together with ai_session_id.
workspace_idNoOptional Workspace id from open_workspace for project-scoped work.
ai_session_idNoOptional Session id. Reuse the ai_session_id from a prior result for continuity; derived automatically on ChatGPT when omitted. Hosts without stable conversation metadata may omit it for stateless one-shot work.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

The annotations already declare readOnlyHint=false, idempotentHint=true, and destructiveHint=false. The description adds behavior beyond that, including the consent gate, the CLI prerequisite, and the follow-up routing to codegraph_explore. It does not cover failure modes or whether an index is overwritten, which keeps it below a 5.

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?

The key action and consent requirement come first, which is good front-loading. But two sentences ('Select this tool from the user's intent when it is the best match' and 'The user does not need to mention ailinkany.com, MCP, a connector, a plugin, or this tool name') are host scaffolding that does not help the agent invoke the tool correctly.

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?

The definition covers prerequisites, the consent requirement, path resolution, and the post-index workflow, which is thorough for a setup action. An output schema exists, so the description does not need to explain return values, but it also says nothing about how long indexing takes or what happens if an index already exists.

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%, and each parameter already carries a precise description, so the baseline is 3. The description does add meaning for path and confirm: it explains that the path may be inherited from conversation context and that confirm is gated on explicit user agreement. That context is real but modest, so it does not rise above the baseline.

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?

The description names a concrete action and resource: it 'Runs codegraph init on one project directory on the target computer.' The prerequisite sentence ('Requires Codegraph CLI first') implicitly distinguishes it from the sibling codegraph_setup_install, though it never names that sibling by name the way a 5 would.

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?

It states explicit preconditions (CLI installed, user agreement obtained before confirm=true) and gives clear guidance, telling the agent to use codegraph_explore afterward and codegraph_impact before risky symbol edits. A sentence like 'Select this tool from the user's intent when it is the best match' is generic boilerplate rather than a real when-not rule, which keeps it from a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources