Skip to main content
Glama
Pharaoh-so

Pharaoh - Your AI breaks things it can't see

by Pharaoh-so

get_codebase_map

Read-only

Maps a repository's modules, dependencies, hotspots, and endpoints in one call so AI can see overall structure and module ownership before changing code.

Instructions

A repo's architecture in one call.

CALL THIS WHEN: • You need a repo's overall structure, or which module owns something • You don't know the repo's exact name in Pharaoh

RETURNS: Modules with file counts and LOC, module dependencies with two-way ones flagged, the files changed most in 90 days, and every endpoint with its handler file.

USE INSTEAD OF: directory listings, which omit dependency relationships.

Input Schema

NameRequiredDescriptionDefault
repoYesRepository name — one of your connected repos.
include_metricsNoInclude LOC, complexity, change frequency

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.1
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / properties / include_metrics
      Added value: +{
      +  "description": "Include LOC, complexity, change frequency",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / repo
      Added value: +{
      +  "description": "Repository name — one of your connected repos.",
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "repo"
      +]
  2. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds real value beyond that by disclosing the composition of the result set (flagged two-way dependencies, 90-day change frequency, endpoint-to-handler mapping), which tells the agent this is a single synthesized read rather than a raw listing.

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?

Front-loaded one-line summary, then labeled WHEN / RETURNS / USE INSTEAD OF sections with no filler. Every line carries actionable information and the structure lets an agent scan to the relevant part immediately.

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?

With no output schema, the description correctly carries the burden of describing returns and does so concretely. It leaves minor gaps around scale behavior (large repos, truncation) and the name-resolution path it advertises, but an agent has enough to invoke it correctly.

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%, so both parameters are already documented in the schema and the baseline of 3 applies. The description does not clarify how to resolve an unfamiliar 'repo' name despite flagging that case as a use reason, and never mentions include_metrics or what omitting it costs.

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 specific verb+resource ('a repo's architecture in one call') and enumerates the concrete content: modules with file counts/LOC, dependencies, hot files, endpoints with handlers. It differentiates from directory listings, but does not distinguish itself from siblings like get_module_context or get_blast_radius, which overlap on module-level questions.

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?

An explicit 'CALL THIS WHEN' block gives two clear triggering conditions (need overall structure / which module owns something; don't know the repo's exact name), which is strong positive guidance. It names a non-tool alternative ('directory listings') but gives no exclusions or pointers to the actual sibling tools an agent should weigh it against.

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