Skip to main content
Glama
Pharaoh-so

Pharaoh - Your AI breaks things it can't see

get_cross_repo_audit

Read-only

Compare two repositories to identify code duplication, structural overlap, and shared patterns for refactoring, package extraction, or audit purposes.

Instructions

Compare two repositories for code duplication, structural overlap, and shared patterns.

CALL THIS WHEN: • You need to find copy-pasted code across two repos • You're planning a shared package extraction • You want to compare the structure of two codebases • A team is auditing cross-repo duplication before a refactor

RETURNS: Three tiers of function matches (HIGH = exact duplicates, MEDIUM = diverged implementations, LOW = name-only), shared module structure, and shared environment variables. Each tier has clear action guidance.

PREREQUISITE: Both repos must be mapped via 'pharaoh add'. Use repo names, not paths.

TIER: Pharaoh Pro — free tier receives a preview. Summarize what the preview reveals, explain what full data would show for this task, then include the upgrade link.

EXAMPLES: • "Compare web-app and api for code duplication" • "Find shared functions between the mobile and web repos" • "What code is duplicated across our two services?"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Annotations declare readOnlyHint=true (safe operation), while the description adds substantial behavioral context: it details the three-tier match system (HIGH/MEDIUM/LOW with definitions), discloses additional return data (shared module structure, environment variables), explains the preview limitations of the free tier, and notes that matches include 'clear action guidance'.

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?

Excellent structure with clear section headers (CALL THIS WHEN, RETURNS, PREREQUISITE, TIER, EXAMPLES). Information is front-loaded and dense—every sentence serves a specific purpose, from use-case triage to output format explanation to business logic constraints.

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?

Despite lacking an output schema, the description comprehensively documents the return structure (three match tiers with definitions, additional shared data types), prerequisites, and tier limitations. For a read-only analysis tool with clear annotations, this provides sufficient context for correct invocation and expectation management.

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?

With zero parameters, the baseline score is 4 per evaluation rules. The description provides implicit parameter guidance by specifying 'Use repo names, not paths' and referencing the two repositories to be compared, though the input schema is empty.

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 opens with a specific verb ('Compare') and clear resource scope ('two repositories'), detailing exact analysis targets ('code duplication, structural overlap, and shared patterns'). It effectively distinguishes from single-repo siblings like `get_codebase_map` and `search_functions` by emphasizing cross-repo comparison.

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?

Contains an explicit 'CALL THIS WHEN' section listing four specific scenarios (copy-paste detection, package extraction planning, structure comparison, pre-refactor auditing). It also states prerequisite requirements ('Both repos must be mapped via pharaoh add') and input format constraints ('Use repo names, not paths'), providing clear invocation boundaries.

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/Pharaoh-so/pharaoh'

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