Skip to main content
Glama
UrbanDiver

Local DeepWiki MCP Server

by UrbanDiver

generate_codemap

Read-onlyIdempotent

Generate a code flow map with Mermaid diagram and narrative trace to answer a query about code execution across files, including file paths and line numbers.

Instructions

Generate a Windsurf-style codemap: a focused execution-flow map with Mermaid diagram and narrative trace for a question or topic. Shows how code flows across files with file paths and line numbers. Best for understanding 'How does X work?' questions.

Requires: index_repository must be called first.

Example: {"repo_path": "/path/to/repo", "query": "How does request handling work?"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_pathYesPath to the indexed repository
queryYesQuestion or topic to map (e.g., 'How does authentication work?', 'Trace the request handling pipeline')
entry_pointNoOptional function/class to start from (e.g., 'handle_ask_question'). Auto-discovered if not provided.
focusNoFocus mode: execution_flow (calls), data_flow (transformations), dependency_chain (imports). Default: execution_flow
max_depthNoMax call graph traversal depth (default: 5, range: 1-10)
max_nodesNoMax nodes in the codemap (default: 30, range: 5-60)
Behavior4/5

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

Annotations (readOnlyHint=true, destructiveHint=false, idempotentHint=true) are consistent. The description adds behavioral details: output includes Mermaid diagram and narrative trace with file paths and line numbers. No contradictions.

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?

Three focused sentences plus an example, no unnecessary words. Structure is logical: purpose, output details, usage context and prerequisite.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequately covers tool purpose and output, but lacks details on how focus modes affect the result, what happens with ambiguous queries, or behavior when max_depth/max_nodes are reached. Missing output schema leaves some uncertainty about return structure.

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 description coverage is 100% (all parameters have descriptions). The description provides a concrete example but doesn't add new semantic meaning beyond the schema. Baseline 3 is appropriate.

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 it generates a Windsurf-style codemap with Mermaid diagram and narrative trace for a specific question or topic. It distinguishes from siblings like get_call_graph by specifying focus on execution-flow mapping with file paths and line numbers.

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?

Provides clear context: 'Best for understanding 'How does X work?' questions', includes a prerequisite (index_repository must be called first), and an example. While it doesn't explicitly list alternatives, the usage context is well-defined.

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/UrbanDiver/local-deepwiki-mcp'

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