Skip to main content
Glama

get_project_map

Read PROJECT_MAP.md to grasp repo structure, entry points, and ownership early in a session, avoiding costly filesystem scans.

Instructions

Read PROJECT_MAP.md to understand the repo structure.

Call this at session start when structure matters (file layout,
entry points, ownership). Cheaper than scanning the filesystem.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Core handler function that reads PROJECT_MAP.md from the .projectmem directory, decorated with @mcp.tool() and @safe_tool. Returns the file contents or a fallback message.
    @mcp.tool()
    @safe_tool
    def get_project_map() -> str:
        """Read PROJECT_MAP.md to understand the repo structure.
    
        Call this at session start when structure matters (file layout,
        entry points, ownership). Cheaper than scanning the filesystem."""
        path = project_map_path()
        if path.exists():
            return path.read_text(encoding="utf-8")
        return "No project map found."
  • The tool's type signature — no input parameters, returns a string. Decorated with @mcp.tool() for MCP registration and @safe_tool for exception handling.
    @mcp.tool()
  • The @mcp.tool() decorator registers this function as an MCP tool on the FastMCP server instance.
    @mcp.tool()
  • Helper function that resolves the path to PROJECT_MAP.md within the .projectmem directory.
    def project_map_path(root: Path | None = None) -> Path:
        return require_mem_dir(root) / PROJECT_MAP_FILE
  • Constant defining the filename for the project map file.
    PROJECT_MAP_FILE = "PROJECT_MAP.md"
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It states the tool reads a file and is cheap, implying read-only, but doesn't explicitly disclose side effects, error behavior (e.g., if file missing), or authentication needs. Additional context would improve transparency.

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?

Two sentences with no waste. The key information is front-loaded: what it does and when to use it. Every word adds value.

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 zero parameters and the existence of an output schema, the description is complete. It covers purpose, usage guidance, and a cost comparison, providing sufficient context for an agent to invoke correctly.

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

Parameters4/5

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

The tool has zero parameters and schema coverage is 100%, so the description need not add param info. Baseline 4 is appropriate; no additional param details beyond the schema are needed.

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 reads PROJECT_MAP.md to understand the repo structure, using specific verb 'Read' and resource. It provides immediate purpose, distinct from siblings like get_global_gotchas or get_instructions.

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?

Explicitly advises calling at session start when structure matters, and notes it's cheaper than scanning the filesystem. This gives clear context and alternative, helping the agent decide when to use.

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/riponcm/projectmem'

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