Skip to main content
Glama
Pharaoh - Your AI breaks things it can't see

Pharaoh - Your AI breaks things it can't see

by Pharaoh-so

Module Context

get_module_context
Read-only

Map a module's files, exports, dependencies, DB tables, endpoints, and callers before changing code or planning changes to understand impact.

Instructions

One module's profile: what it contains, depends on and is called by.

CALL THIS WHEN: • Changing code in a module, or planning a change to it • Finding what a module exports, depends on, or which code calls into it

RETURNS: Files, LOC, exported signatures with complexity, imports in and out, DB tables, endpoints, cron jobs, env vars, and callers in other modules, grouped by module.

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": {
      "repo": "<repo>",
      "module": "<module>"
    },
    "name": "get_module_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoYesRepository name — one of your connected repos.
moduleYesModule name (e.g., "crons", "slack", "db")

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 / module
      Added value: +{
      +  "description": "Module name (e.g., \"crons\", \"slack\", \"db\")",
      +  "type": "string"
      +}
    • addedInput schema / properties / repo
      Added value: +{
      +  "description": "Repository name — one of your connected repos.",
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "repo",
      +  "module"
      +]
  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 with the RETURNS block, previewing the shape of the payload (files, LOC, signatures with complexity, imports, DB tables, endpoints, cron jobs, env vars, callers). It omits any note on response size, truncation, or behavior when a module name is unknown.

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?

The summary line is front-loaded, and the WHEN and RETURNS blocks are scannable headers rather than prose. Every line earns its place, and the RETURNS enumeration is dense but each item is distinct information.

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?

There is no output schema, so the RETURNS section does necessary work in describing the payload, and the annotations cover the read-only safety profile. What remains thin is error handling and result size for a tool that can return signatures, imports, tables, endpoints, and callers for a module.

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%, and the schema already explains both 'repo' (a connected repo) and 'module' with examples, so the schema carries the load. The phrase 'One module's profile' mildly reinforces that exactly one module is accepted rather than a list, but that is the only added meaning.

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 opening sentence names a specific resource (one module) and enumerates the three dimensions of its profile: contents, dependencies, and callers. That is enough for an agent to distinguish it from get_codebase_map (whole-repo map) and get_blast_radius (impact analysis), though the description never names those siblings explicitly.

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?

The 'CALL THIS WHEN' block gives two concrete triggering scenarios: changing code in a module and locating a module's exports, dependencies, or callers. It stops short of stating when NOT to use it or pointing to a specific alternative among the eight siblings, so the routing decision still requires inference.

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