@pharaoh-so/mcp 0.1.3 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth.js.map +1 -0
- package/dist/credentials.js.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/inspect.d.ts +11 -0
- package/dist/inspect.js +45 -0
- package/dist/proxy.js.map +1 -0
- package/inspect-tools.json +856 -0
- package/package.json +32 -31
package/dist/auth.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA+BH;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,OAAe;IACtD,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,OAAO,SAAS,EAAE;QAC5C,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;KACxB,CAAC,CAAC;IAEH,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;QACb,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,+BAA+B,GAAG,CAAC,MAAM,MAAM,IAAI,EAAE,CAAC,CAAC;IACxE,CAAC;IAED,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAuB,CAAC;AACjD,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CACjC,OAAe,EACf,UAAkB,EAClB,QAAgB;IAEhB,MAAM,SAAS,GAAG,8CAA8C,CAAC;IAEjE,OAAO,IAAI,EAAE,CAAC;QACb,+CAA+C;QAC/C,MAAM,QAAQ,GAAG,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CAAC,IAAI,GAAG,gBAAgB;IACxD,IAAI,CAAC;QACJ,UAAU,CAAC,IAAI,CAAC,CAAC;IAClB,CAAC;IAAC,MAAM,CAAC;QACR,yCAAyC;IAC1C,CAAC;AACF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,KAAkB;IAC3C,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE,CAAC;IACvD,IAAI,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC;QAAE,OAAO,IAAI,CAAC;IAEzC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACvB,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC;IAC3C,MAAM,QAAQ,GAAG,UAAU,GAAG,GAAG,CAAC;IAElC,OAAO,GAAG,IAAI,SAAS,GAAG,QAAQ,CAAC;AACpC,CAAC;AAED,+CAA+C;AAC/C,SAAS,kBAAkB,CAAC,KAAc;IACzC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC9D,MAAM,GAAG,GAAG,KAAgC,CAAC;IAC7C,OAAO,CACN,GAAG,CAAC,OAAO,KAAK,cAAc;QAC9B,OAAO,GAAG,CAAC,YAAY,KAAK,QAAQ;QACpC,OAAO,GAAG,CAAC,UAAU,KAAK,QAAQ;QAClC,OAAO,GAAG,CAAC,UAAU,KAAK,QAAQ;QAClC,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ;QAC/B,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CACxB,CAAC;AACH,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,12 @@ async function main() {
|
|
|
20
20
|
printUsage();
|
|
21
21
|
process.exit(0);
|
|
22
22
|
}
|
|
23
|
+
// Inspect mode — serve tool schemas over stdio for Glama directory inspection
|
|
24
|
+
if (args.includes("--inspect")) {
|
|
25
|
+
const { runInspect } = await import("./inspect.js");
|
|
26
|
+
await runInspect();
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
23
29
|
const { server, logout } = parseArgs(args);
|
|
24
30
|
if (logout) {
|
|
25
31
|
deleteCredentials();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;GAMG;AACH,OAAO,EACN,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,GAEjB,MAAM,WAAW,CAAC;AACnB,OAAO,EAEN,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,gBAAgB,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEjF,MAAM,cAAc,GAAG,wBAAwB,CAAC;AAEhD,2BAA2B;AAC3B,SAAS,SAAS;IACjB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnC,IAAI,MAAM,GAAG,cAAc,CAAC;IAC5B,IAAI,MAAM,GAAG,KAAK,CAAC;IAEnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,UAAU,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;YAC3C,MAAM,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACrB,CAAC,EAAE,CAAC;QACL,CAAC;aAAM,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,UAAU,EAAE,CAAC;YACnC,MAAM,GAAG,IAAI,CAAC;QACf,CAAC;aAAM,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,IAAI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AAO,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;QACrD,CAAC;aAAM,IAAI,GAAG,YAAY,oBAAoB,EAAE,CAAC;YAChD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC;YAClD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACjB,CAAC;aAAM,CAAC;YACP,MAAM,GAAG,CAAC;QACX,CAAC;IACF,CAAC;AACF,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACpB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC/F,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inspect mode — serves Pharaoh's tool schemas over stdio for Glama inspection.
|
|
3
|
+
*
|
|
4
|
+
* Reads pre-generated tool schemas from inspect-tools.json (generated at build
|
|
5
|
+
* time by the main repo's `generate-inspect-schemas.ts`). Registers each tool
|
|
6
|
+
* on an MCP server that returns a "connect to mcp.pharaoh.so" message if invoked.
|
|
7
|
+
*
|
|
8
|
+
* Zero-drift: schemas are extracted from the same registerXxx() code that the
|
|
9
|
+
* production server uses, serialized to JSON during build, and shipped in the npm package.
|
|
10
|
+
*/
|
|
11
|
+
export declare function runInspect(): Promise<void>;
|
package/dist/inspect.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inspect mode — serves Pharaoh's tool schemas over stdio for Glama inspection.
|
|
3
|
+
*
|
|
4
|
+
* Reads pre-generated tool schemas from inspect-tools.json (generated at build
|
|
5
|
+
* time by the main repo's `generate-inspect-schemas.ts`). Registers each tool
|
|
6
|
+
* on an MCP server that returns a "connect to mcp.pharaoh.so" message if invoked.
|
|
7
|
+
*
|
|
8
|
+
* Zero-drift: schemas are extracted from the same registerXxx() code that the
|
|
9
|
+
* production server uses, serialized to JSON during build, and shipped in the npm package.
|
|
10
|
+
*/
|
|
11
|
+
import { readFileSync } from "node:fs";
|
|
12
|
+
import { join } from "node:path";
|
|
13
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
14
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
15
|
+
const INSPECT_MSG = "This is Pharaoh's inspection server for directory listings. " +
|
|
16
|
+
"Connect to https://mcp.pharaoh.so for actual usage.";
|
|
17
|
+
export async function runInspect() {
|
|
18
|
+
// Load pre-generated schemas (shipped in the npm package)
|
|
19
|
+
const schemasPath = join(import.meta.dirname, "..", "inspect-tools.json");
|
|
20
|
+
let schemas;
|
|
21
|
+
try {
|
|
22
|
+
schemas = JSON.parse(readFileSync(schemasPath, "utf-8"));
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
process.stderr.write("Pharaoh: inspect-tools.json not found — rebuild the package.\n");
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
const server = new McpServer({ name: "pharaoh", version: "0.1.0" }, {
|
|
29
|
+
instructions: "Pharaoh turns codebases into knowledge graphs that AI agents can think with. " +
|
|
30
|
+
"Connect at https://mcp.pharaoh.so for full functionality.",
|
|
31
|
+
});
|
|
32
|
+
// Register each tool with pre-serialized JSON Schema.
|
|
33
|
+
// Cast inputSchema to satisfy TypeScript — at runtime registerTool passes it through as-is.
|
|
34
|
+
for (const tool of schemas.tools) {
|
|
35
|
+
// biome-ignore lint/suspicious/noExplicitAny: JSON Schema from inspect-tools.json, not Zod
|
|
36
|
+
const schema = tool.inputSchema;
|
|
37
|
+
server.registerTool(tool.name, {
|
|
38
|
+
description: tool.description,
|
|
39
|
+
inputSchema: schema,
|
|
40
|
+
annotations: tool.annotations,
|
|
41
|
+
}, async () => ({ content: [{ type: "text", text: INSPECT_MSG }] }));
|
|
42
|
+
}
|
|
43
|
+
const transport = new StdioServerTransport();
|
|
44
|
+
await server.connect(transport);
|
|
45
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../src/proxy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,+EAA+E;AAC/E,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAC3C;QACC,KAAK,CAAC,gCAAgC,CAAC,CAAC;QACxC,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IACjC,CAAC;CACD;AAED,uEAAuE;AACvE,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAC9C,YAAY,OAAe;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACpC,CAAC;CACD;AAED,8DAA8D;AAC9D,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AAEpD;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAU;IAC1C,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;IAC9B,kDAAkD;IAClD,IAAI,MAAM,IAAI,GAAG,EAAE,CAAC;QACnB,MAAM,IAAI,GAAI,GAAyB,CAAC,IAAI,CAAC;QAC7C,IAAI,IAAI,KAAK,GAAG;YAAE,MAAM,IAAI,iBAAiB,EAAE,CAAC;QAChD,IAAI,IAAI,KAAK,GAAG;YAAE,MAAM,IAAI,oBAAoB,CAAC,GAAG,IAAI,kBAAkB,CAAC,CAAC;IAC7E,CAAC;IACD,2CAA2C;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AI,gBAAgB,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC;oBAC1C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qDAAqD,CAAC,CAAC;oBAC5E,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;oBACpC,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;gBAChE,CAAC;YACF,CAAC;QACF,CAAC;IACF,CAAC;AACF,CAAC;AAED,SAAS,KAAK,CAAC,EAAU;IACxB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -0,0 +1,856 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tools": [
|
|
3
|
+
{
|
|
4
|
+
"name": "get_codebase_map",
|
|
5
|
+
"title": "Codebase Architecture Map",
|
|
6
|
+
"description": "Pharaoh is a codebase knowledge graph. Call this FIRST — get the full architecture instead of reading files one-by-one.\n\nCALL THIS WHEN:\n• You're starting a new task and need to understand the codebase structure\n• You need to know which modules exist and how they relate to each other\n• You want to find the most actively changed files (likely where bugs live)\n• You need to see all API endpoints at a glance\n\nRETURNS: All modules with file counts and LOC, dependency graph with weights and bidirectional warnings, hot files (most changed in last 90 days), and all HTTP endpoints with their handler files.\n\nEXAMPLES:\n• \"What modules does this codebase have?\"\n• \"How is the codebase structured?\"\n• \"Which files change the most?\"\n• \"Are there any circular dependencies between modules?\"\n\nWHY NOT JUST READ FILES: Manually reading directory trees and package.json files gives you file structure but not dependency relationships, change frequency, or endpoint mappings. This gives you the full architectural picture in one call instead of 20+ file reads.",
|
|
7
|
+
"inputSchema": {
|
|
8
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"repo": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Repository name. Works with your connected repos or any public open source repo by GitHub slug (e.g., 'vercel/next.js')."
|
|
14
|
+
},
|
|
15
|
+
"include_metrics": {
|
|
16
|
+
"description": "Include LOC, complexity, change frequency",
|
|
17
|
+
"type": "boolean"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"required": [
|
|
21
|
+
"repo"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"annotations": {
|
|
25
|
+
"readOnlyHint": true,
|
|
26
|
+
"destructiveHint": false
|
|
27
|
+
},
|
|
28
|
+
"execution": {
|
|
29
|
+
"taskSupport": "forbidden"
|
|
30
|
+
},
|
|
31
|
+
"_meta": {
|
|
32
|
+
"ui": {
|
|
33
|
+
"resourceUri": "ui://pharaoh/codebase-explorer"
|
|
34
|
+
},
|
|
35
|
+
"ui/resourceUri": "ui://pharaoh/codebase-explorer"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "pharaoh_recon",
|
|
40
|
+
"description": "Get the full architectural picture in ONE call — combines codebase map, module deep-dives, function search, blast radius, and dependency queries.\n\nCALL THIS WHEN:\n• Starting a new task and need to orient before making changes\n• Running a plan review, PR review, or architecture assessment\n• You know which modules, functions, and blast targets you need up front\n\nRETURNS: All requested sections in a single response — codebase map, module profiles, search results, blast radius assessments, and dependency paths. All sub-queries run in parallel server-side.\n\nUse individual tools (get_module_context, get_blast_radius, search_functions, etc.) for follow-up deep-dives after initial recon.\n\nLIMITS: Max 5 modules, 3 searches, 3 blast radius targets, 3 dependency pairs per call.",
|
|
41
|
+
"inputSchema": {
|
|
42
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
43
|
+
"type": "object",
|
|
44
|
+
"properties": {
|
|
45
|
+
"repo": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"description": "Repository name. Works with your connected repos or any public open source repo by GitHub slug (e.g., 'vercel/next.js')."
|
|
48
|
+
},
|
|
49
|
+
"include_map": {
|
|
50
|
+
"description": "Include codebase map in response (default: true)",
|
|
51
|
+
"type": "boolean"
|
|
52
|
+
},
|
|
53
|
+
"modules": {
|
|
54
|
+
"description": "Module names to get full context for (max 5). E.g. [\"auth\", \"db\", \"mcp\"]",
|
|
55
|
+
"type": "array",
|
|
56
|
+
"items": {
|
|
57
|
+
"type": "string"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"functions": {
|
|
61
|
+
"description": "Function search queries (max 3). E.g. [\"validateToken\", \"handleWebhook\"]",
|
|
62
|
+
"type": "array",
|
|
63
|
+
"items": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"blast_radius": {
|
|
68
|
+
"description": "Blast radius targets to assess change risk (max 3)",
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"properties": {
|
|
73
|
+
"entity": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"description": "Function name, file path, or module name"
|
|
76
|
+
},
|
|
77
|
+
"entity_type": {
|
|
78
|
+
"description": "Type of entity (default: function)",
|
|
79
|
+
"type": "string",
|
|
80
|
+
"enum": [
|
|
81
|
+
"function",
|
|
82
|
+
"file",
|
|
83
|
+
"module"
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"required": [
|
|
88
|
+
"entity"
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"dependencies": {
|
|
93
|
+
"description": "Module dependency pairs to trace (max 3)",
|
|
94
|
+
"type": "array",
|
|
95
|
+
"items": {
|
|
96
|
+
"type": "object",
|
|
97
|
+
"properties": {
|
|
98
|
+
"from": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"description": "Source module name"
|
|
101
|
+
},
|
|
102
|
+
"to": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"description": "Target module name"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"required": [
|
|
108
|
+
"from",
|
|
109
|
+
"to"
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"required": [
|
|
115
|
+
"repo"
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
"annotations": {
|
|
119
|
+
"title": "Codebase Recon",
|
|
120
|
+
"readOnlyHint": true,
|
|
121
|
+
"destructiveHint": false
|
|
122
|
+
},
|
|
123
|
+
"execution": {
|
|
124
|
+
"taskSupport": "forbidden"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "get_module_context",
|
|
129
|
+
"description": "Get everything you need to know about a module BEFORE modifying it or writing a PRD.\n\nCALL THIS WHEN:\n• You're about to change code in a module — understand its full surface area first\n• You're writing a PRD or design doc and need ground-truth about what exists\n• You need to know what depends on this module (who breaks if you change it)\n• You want to see a module's DB tables, endpoints, cron jobs, or env vars at a glance\n\nRETURNS: Complete module profile in ~2K tokens: file count, LOC, all exported function signatures with complexity, dependency graph (imports from + imported by), DB table access, HTTP endpoints, cron jobs, env vars, vision spec alignment, and external callers from other modules.\n\nEXAMPLES:\n• \"What does the slack module look like before I add a new notification?\"\n• \"What endpoints does the auth module expose?\"\n• \"Which modules depend on the db module?\"\n• \"What env vars does the crons module use?\"\n\nWHY NOT JUST READ FILES: A module can span dozens of files. Manual exploration burns 10K-40K tokens and still misses cross-module callers, DB access patterns, and vision spec alignment. This returns the complete picture in one call.",
|
|
130
|
+
"inputSchema": {
|
|
131
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
132
|
+
"type": "object",
|
|
133
|
+
"properties": {
|
|
134
|
+
"repo": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"description": "Repository name. Works with your connected repos or any public open source repo by GitHub slug (e.g., 'vercel/next.js')."
|
|
137
|
+
},
|
|
138
|
+
"module": {
|
|
139
|
+
"type": "string",
|
|
140
|
+
"description": "Module name (e.g., \"crons\", \"slack\", \"db\")"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"required": [
|
|
144
|
+
"repo",
|
|
145
|
+
"module"
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
"annotations": {
|
|
149
|
+
"title": "Module Deep Dive",
|
|
150
|
+
"readOnlyHint": true,
|
|
151
|
+
"destructiveHint": false
|
|
152
|
+
},
|
|
153
|
+
"execution": {
|
|
154
|
+
"taskSupport": "forbidden"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"name": "search_functions",
|
|
159
|
+
"description": "Check if functionality already exists BEFORE writing any new function, utility, or helper.\n\nCALL THIS WHEN:\n• You're about to create a new function — search first to prevent duplicates\n• You need to find where a concept is implemented (e.g., 'notify', 'validate', 'parse')\n• You're looking for the right function to import instead of reimplementing\n• A task says 'add X functionality' — verify X doesn't already exist\n\nRETURNS: Matching functions with file paths, line numbers, module, export status, async flag, complexity scores, and full signatures. Searches all functions across the entire codebase.\n\nEXAMPLES:\n• \"Is there already a function that sends Slack notifications?\"\n• \"What validation utilities exist?\"\n• \"Where is email formatting handled?\"\n• \"Does a retry wrapper already exist somewhere?\"\n\nWHY NOT JUST READ FILES: grep only finds exact string matches and misses re-exports, aliases, and barrel-file indirection. This searches the full resolved dependency graph — if it exists anywhere in the codebase, this finds it.",
|
|
160
|
+
"inputSchema": {
|
|
161
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
162
|
+
"type": "object",
|
|
163
|
+
"properties": {
|
|
164
|
+
"repo": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"description": "Repository name. Works with your connected repos or any public open source repo by GitHub slug (e.g., 'vercel/next.js')."
|
|
167
|
+
},
|
|
168
|
+
"query": {
|
|
169
|
+
"type": "string",
|
|
170
|
+
"description": "Function name or partial match (e.g., \"notify\", \"fetch\", \"transform\")"
|
|
171
|
+
},
|
|
172
|
+
"module": {
|
|
173
|
+
"description": "Filter to a specific module",
|
|
174
|
+
"type": "string"
|
|
175
|
+
},
|
|
176
|
+
"file": {
|
|
177
|
+
"description": "Filter to functions in a specific file (full path for exact match, filename for substring match)",
|
|
178
|
+
"type": "string"
|
|
179
|
+
},
|
|
180
|
+
"exported_only": {
|
|
181
|
+
"description": "Only show exported functions (default: false)",
|
|
182
|
+
"type": "boolean"
|
|
183
|
+
},
|
|
184
|
+
"offset": {
|
|
185
|
+
"description": "Skip first N results for pagination (default: 0)",
|
|
186
|
+
"type": "number"
|
|
187
|
+
},
|
|
188
|
+
"limit": {
|
|
189
|
+
"description": "Max results to return (default: 20, max: 50)",
|
|
190
|
+
"type": "number"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"required": [
|
|
194
|
+
"repo",
|
|
195
|
+
"query"
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
"annotations": {
|
|
199
|
+
"title": "Function Search",
|
|
200
|
+
"readOnlyHint": true,
|
|
201
|
+
"destructiveHint": false
|
|
202
|
+
},
|
|
203
|
+
"execution": {
|
|
204
|
+
"taskSupport": "forbidden"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"name": "get_design_system",
|
|
209
|
+
"description": "Discover the design system BEFORE creating any UI component.\n\nCALL THIS WHEN:\n• You're about to create a React/Vue/Svelte component — check what already exists\n• You need to know the canonical component for a UI pattern (button, input, modal)\n• You want to find design tokens (colors, spacing, typography) to use\n• You suspect raw HTML elements are used instead of existing components\n\nRETURNS: Components with props and usage count, design tokens with values, and anti-patterns where raw HTML is used instead of existing components. Screen/page components are excluded by default.\n\nEXAMPLES:\n• \"What components does this design system have?\"\n• \"Is there already a Button component I should use?\"\n• \"What color tokens are available?\"\n• \"Where are raw HTML elements used instead of components?\"\n\nWHY NOT JUST READ FILES: Design systems span dozens of files across multiple directories. This returns the complete inventory with usage frequency — the most-used components are the most canonical.",
|
|
210
|
+
"inputSchema": {
|
|
211
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
212
|
+
"type": "object",
|
|
213
|
+
"properties": {
|
|
214
|
+
"repo": {
|
|
215
|
+
"type": "string",
|
|
216
|
+
"description": "Repository name"
|
|
217
|
+
},
|
|
218
|
+
"category": {
|
|
219
|
+
"default": "all",
|
|
220
|
+
"description": "Which design system aspect to return",
|
|
221
|
+
"type": "string",
|
|
222
|
+
"enum": [
|
|
223
|
+
"components",
|
|
224
|
+
"tokens",
|
|
225
|
+
"anti_patterns",
|
|
226
|
+
"all"
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
"min_usage": {
|
|
230
|
+
"default": 0,
|
|
231
|
+
"description": "Minimum number of files importing the component (0 = show all)",
|
|
232
|
+
"type": "number"
|
|
233
|
+
},
|
|
234
|
+
"include_screens": {
|
|
235
|
+
"default": false,
|
|
236
|
+
"description": "Include screen/page components (*Screen, *Page, *View, *Route) that are typically app-level consumers, not reusable primitives",
|
|
237
|
+
"type": "boolean"
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"required": [
|
|
241
|
+
"repo"
|
|
242
|
+
]
|
|
243
|
+
},
|
|
244
|
+
"annotations": {
|
|
245
|
+
"title": "Design System",
|
|
246
|
+
"readOnlyHint": true,
|
|
247
|
+
"destructiveHint": false
|
|
248
|
+
},
|
|
249
|
+
"execution": {
|
|
250
|
+
"taskSupport": "forbidden"
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"name": "get_blast_radius",
|
|
255
|
+
"description": "Check what breaks BEFORE refactoring, renaming, or deleting a function, file, or module.\n\nCALL THIS WHEN:\n• You're about to refactor or rename a function — see every caller that needs updating\n• You want to know if a change is safe — check if anything depends on this code\n• A PR modifies a shared utility — trace all downstream consumers\n• You need to assess risk level before a change (LOW/MEDIUM/HIGH)\n\nRETURNS: Risk assessment (LOW/MEDIUM/HIGH), all affected callers grouped by module with file paths, impacted HTTP endpoints, impacted cron jobs, and affected DB operations. Traces up to 5 hops deep through the call graph.\n\nEXAMPLES:\n• \"What breaks if I change the formatMessage function?\"\n• \"How many callers does this utility have across the codebase?\"\n• \"Is it safe to delete this file or do other modules use it?\"\n• \"Which API endpoints are affected if I modify the db module?\"\n\nWHY NOT JUST READ FILES: You can grep for direct callers, but you'll miss indirect callers 2-3 hops away, and you won't see affected endpoints or cron jobs. This traces the full transitive dependency chain automatically.",
|
|
256
|
+
"inputSchema": {
|
|
257
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
258
|
+
"type": "object",
|
|
259
|
+
"properties": {
|
|
260
|
+
"repo": {
|
|
261
|
+
"type": "string",
|
|
262
|
+
"description": "Repository name. Works with your connected repos or any public open source repo by GitHub slug (e.g., 'vercel/next.js')."
|
|
263
|
+
},
|
|
264
|
+
"entity": {
|
|
265
|
+
"type": "string",
|
|
266
|
+
"description": "Function name, file path, or module name"
|
|
267
|
+
},
|
|
268
|
+
"entity_type": {
|
|
269
|
+
"type": "string",
|
|
270
|
+
"enum": [
|
|
271
|
+
"function",
|
|
272
|
+
"file",
|
|
273
|
+
"module"
|
|
274
|
+
],
|
|
275
|
+
"description": "Type of entity"
|
|
276
|
+
},
|
|
277
|
+
"depth": {
|
|
278
|
+
"description": "How many hops to trace (default: 3, max: 5)",
|
|
279
|
+
"type": "number"
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"required": [
|
|
283
|
+
"repo",
|
|
284
|
+
"entity",
|
|
285
|
+
"entity_type"
|
|
286
|
+
]
|
|
287
|
+
},
|
|
288
|
+
"annotations": {
|
|
289
|
+
"title": "Change Blast Radius",
|
|
290
|
+
"readOnlyHint": true,
|
|
291
|
+
"destructiveHint": false
|
|
292
|
+
},
|
|
293
|
+
"execution": {
|
|
294
|
+
"taskSupport": "forbidden"
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"name": "query_dependencies",
|
|
299
|
+
"description": "Trace how two modules are connected BEFORE splitting, merging, or decoupling them.\n\nCALL THIS WHEN:\n• You're refactoring and need to know if two modules depend on each other\n• You suspect a circular dependency and want to confirm it\n• You're planning to extract shared code and need to see what both modules use\n• You need to understand why changing module A affects module B\n\nRETURNS: Forward and reverse dependency paths between the two modules, circular dependency detection with warnings, and all shared dependencies (modules both depend on).\n\nEXAMPLES:\n• \"Do slack and crons have a circular dependency?\"\n• \"What's the dependency path from auth to db?\"\n• \"What do the api and workers modules have in common?\"\n• \"Why does changing utils break the notifications module?\"\n\nWHY NOT JUST READ FILES: Import statements show direct dependencies but miss transitive paths (A→B→C→D). This traces the full module graph and reveals indirect connections, circular dependencies, and shared dependencies invisible from file-level inspection.",
|
|
300
|
+
"inputSchema": {
|
|
301
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
302
|
+
"type": "object",
|
|
303
|
+
"properties": {
|
|
304
|
+
"repo": {
|
|
305
|
+
"type": "string",
|
|
306
|
+
"description": "Repository name. Works with your connected repos or any public open source repo by GitHub slug (e.g., 'vercel/next.js')."
|
|
307
|
+
},
|
|
308
|
+
"from": {
|
|
309
|
+
"type": "string",
|
|
310
|
+
"description": "Source module name"
|
|
311
|
+
},
|
|
312
|
+
"to": {
|
|
313
|
+
"type": "string",
|
|
314
|
+
"description": "Target module name"
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"required": [
|
|
318
|
+
"repo",
|
|
319
|
+
"from",
|
|
320
|
+
"to"
|
|
321
|
+
]
|
|
322
|
+
},
|
|
323
|
+
"annotations": {
|
|
324
|
+
"title": "Dependency Query",
|
|
325
|
+
"readOnlyHint": true,
|
|
326
|
+
"destructiveHint": false
|
|
327
|
+
},
|
|
328
|
+
"execution": {
|
|
329
|
+
"taskSupport": "forbidden"
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"name": "check_reachability",
|
|
334
|
+
"description": "Check if functions are reachable from production entry points (API endpoints, CLI commands, cron jobs, event handlers, MCP tools).\n\nCALL THIS WHEN:\n• After implementing a feature — verify new code is wired into the app\n• Reviewing a PR — are all new functions actually reachable?\n• Cleaning up dead code — find functions only called by tests\n• Before opening a PR — run this as a pre-flight check\n\nRETURNS: For each exported function, whether it's reachable from a production entry point,\nthe path from entry point to function, and classification (entry_point / reachable / unreachable).\n\nTIER: 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.",
|
|
335
|
+
"inputSchema": {
|
|
336
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
337
|
+
"type": "object",
|
|
338
|
+
"properties": {
|
|
339
|
+
"repo": {
|
|
340
|
+
"type": "string",
|
|
341
|
+
"description": "Repository name. Works with your connected repos or any public open source repo by GitHub slug (e.g., 'vercel/next.js')."
|
|
342
|
+
},
|
|
343
|
+
"functions": {
|
|
344
|
+
"description": "Function names to check (checks all exported if omitted)",
|
|
345
|
+
"type": "array",
|
|
346
|
+
"items": {
|
|
347
|
+
"type": "string"
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"module": {
|
|
351
|
+
"description": "Filter to a specific module",
|
|
352
|
+
"type": "string"
|
|
353
|
+
},
|
|
354
|
+
"include_paths": {
|
|
355
|
+
"description": "Include full reachability paths (default: false)",
|
|
356
|
+
"type": "boolean"
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"required": [
|
|
360
|
+
"repo"
|
|
361
|
+
]
|
|
362
|
+
},
|
|
363
|
+
"annotations": {
|
|
364
|
+
"title": "Reachability Check",
|
|
365
|
+
"readOnlyHint": true,
|
|
366
|
+
"destructiveHint": false
|
|
367
|
+
},
|
|
368
|
+
"execution": {
|
|
369
|
+
"taskSupport": "forbidden"
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"name": "get_vision_docs",
|
|
374
|
+
"description": "Get the documented intent — CLAUDE.md files, PRDs, roadmaps, skill specs — to understand WHY code exists, not just what it does.\n\nCALL THIS WHEN:\n• You're implementing a feature and need to check if a PRD or spec exists for it\n• You want to understand the original design intent behind existing code\n• You need to verify your implementation matches documented requirements\n• You're reviewing code and want to check it against the documented vision\n\nRETURNS: All vision documents grouped by type (claude_md, prd, skill, roadmap), with each spec's title, section ID, and implementation status showing which functions implement each spec.\n\nEXAMPLES:\n• \"Is there a PRD for the notification system?\"\n• \"What does the CLAUDE.md say about the auth module?\"\n• \"What specs exist for the slack integration?\"\n• \"Which specs are already implemented vs still pending?\"\n\nWHY NOT JUST READ FILES: Vision docs are scattered across CLAUDE.md files, PRDs, and roadmaps in different directories. This aggregates them all AND cross-references against actual implementations so you can see spec-to-code alignment in one call.\n\nTIER: 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.",
|
|
375
|
+
"inputSchema": {
|
|
376
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
377
|
+
"type": "object",
|
|
378
|
+
"properties": {
|
|
379
|
+
"repo": {
|
|
380
|
+
"type": "string",
|
|
381
|
+
"description": "Repository name"
|
|
382
|
+
},
|
|
383
|
+
"module": {
|
|
384
|
+
"description": "Filter to specs related to this module",
|
|
385
|
+
"type": "string"
|
|
386
|
+
},
|
|
387
|
+
"doc_type": {
|
|
388
|
+
"description": "Filter by document type",
|
|
389
|
+
"type": "string",
|
|
390
|
+
"enum": [
|
|
391
|
+
"claude_md",
|
|
392
|
+
"prd",
|
|
393
|
+
"skill",
|
|
394
|
+
"roadmap",
|
|
395
|
+
"all"
|
|
396
|
+
]
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
"required": [
|
|
400
|
+
"repo"
|
|
401
|
+
]
|
|
402
|
+
},
|
|
403
|
+
"annotations": {
|
|
404
|
+
"title": "Vision Documents",
|
|
405
|
+
"readOnlyHint": true,
|
|
406
|
+
"destructiveHint": false
|
|
407
|
+
},
|
|
408
|
+
"execution": {
|
|
409
|
+
"taskSupport": "forbidden"
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"name": "get_vision_gaps",
|
|
414
|
+
"description": "Find what's missing — specs without code AND complex code without specs. Call this to prioritize what to build or document next.\n\nCALL THIS WHEN:\n• You're planning work and need to find unimplemented features from PRDs\n• You want to find complex undocumented functions that need specs or tests\n• You need to audit spec-to-code alignment for a module\n• Someone asks \"what's left to build?\" or \"what's undocumented?\"\n\nRETURNS: Two lists — (1) specified-but-not-built: PRD specs with no implementing functions, and (2) built-but-not-specified: complex functions above a threshold with no vision spec. Includes function names, complexity scores, file paths, and spec references.\n\nEXAMPLES:\n• \"What features from the PRDs haven't been built yet?\"\n• \"Which complex functions lack documentation?\"\n• \"What's the spec coverage for the auth module?\"\n• \"Are there any orphaned specs or undocumented behaviors?\"\n\nWHY NOT JUST READ FILES: Manually diffing PRD bullets against code is error-prone and misses complexity metrics. This cross-references the entire spec tree against the function graph automatically — gaps that would take an hour to find manually surface in seconds.\n\nTIER: 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.",
|
|
415
|
+
"inputSchema": {
|
|
416
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
417
|
+
"type": "object",
|
|
418
|
+
"properties": {
|
|
419
|
+
"repo": {
|
|
420
|
+
"type": "string",
|
|
421
|
+
"description": "Repository name"
|
|
422
|
+
},
|
|
423
|
+
"module": {
|
|
424
|
+
"description": "Filter to a specific module",
|
|
425
|
+
"type": "string"
|
|
426
|
+
},
|
|
427
|
+
"complexity_threshold": {
|
|
428
|
+
"description": "Min complexity for undocumented function flag (default: 15)",
|
|
429
|
+
"type": "number"
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
"required": [
|
|
433
|
+
"repo"
|
|
434
|
+
]
|
|
435
|
+
},
|
|
436
|
+
"annotations": {
|
|
437
|
+
"title": "Vision Gap Analysis",
|
|
438
|
+
"readOnlyHint": true,
|
|
439
|
+
"destructiveHint": false
|
|
440
|
+
},
|
|
441
|
+
"execution": {
|
|
442
|
+
"taskSupport": "forbidden"
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"name": "get_cross_repo_audit",
|
|
447
|
+
"description": "Compare two repositories for code duplication, structural overlap, and shared patterns.\n\nCALL THIS WHEN:\n• You need to find copy-pasted code across two repos\n• You're planning a shared package extraction\n• You want to compare the structure of two codebases\n• A team is auditing cross-repo duplication before a refactor\n\nRETURNS: 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.\n\nPREREQUISITE: Both repos must be mapped via 'pharaoh add'. Use repo names, not paths.\n\nTIER: 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.\n\nEXAMPLES:\n• \"Compare web-app and api for code duplication\"\n• \"Find shared functions between the mobile and web repos\"\n• \"What code is duplicated across our two services?\"",
|
|
448
|
+
"inputSchema": {
|
|
449
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
450
|
+
"type": "object",
|
|
451
|
+
"properties": {
|
|
452
|
+
"repo_a": {
|
|
453
|
+
"type": "string",
|
|
454
|
+
"description": "First repository name"
|
|
455
|
+
},
|
|
456
|
+
"repo_b": {
|
|
457
|
+
"type": "string",
|
|
458
|
+
"description": "Second repository name"
|
|
459
|
+
},
|
|
460
|
+
"min_loc": {
|
|
461
|
+
"default": 3,
|
|
462
|
+
"description": "Minimum function LOC to include (filters trivial one-liners)",
|
|
463
|
+
"type": "number"
|
|
464
|
+
},
|
|
465
|
+
"exported_only": {
|
|
466
|
+
"default": true,
|
|
467
|
+
"description": "Only compare exported functions (reduces common-name noise)",
|
|
468
|
+
"type": "boolean"
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
"required": [
|
|
472
|
+
"repo_a",
|
|
473
|
+
"repo_b"
|
|
474
|
+
]
|
|
475
|
+
},
|
|
476
|
+
"annotations": {
|
|
477
|
+
"title": "Cross-Repo Audit",
|
|
478
|
+
"readOnlyHint": true,
|
|
479
|
+
"destructiveHint": false
|
|
480
|
+
},
|
|
481
|
+
"execution": {
|
|
482
|
+
"taskSupport": "forbidden"
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
"name": "get_consolidation_opportunities",
|
|
487
|
+
"description": "Find code that does the same work in different places — parallel consumers, duplicated call chains, competing DB access, and similar functions across modules. Returns structural clusters for review.\n\nCALL THIS WHEN:\n• You're looking for code to consolidate, deduplicate, or streamline\n• Before building something new — check if similar logic already exists in another module\n• During refactoring planning — find the highest-impact merge opportunities\n• When the codebase feels bloated but you can't pinpoint where\n\nRETURNS: Clusters grouped by type (parallel consumers, fan-in duplication, competing DB access, signature twins, convergent imports). Each cluster includes file paths, line numbers, and enough context for you to evaluate whether merging makes sense.\n\nWHY NOT JUST READ FILES: You'd need to read every function and mentally track all call chains, DB access, and import patterns across the entire codebase. This queries the full graph in <3 seconds.\n\nTIER: 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.",
|
|
488
|
+
"inputSchema": {
|
|
489
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
490
|
+
"type": "object",
|
|
491
|
+
"properties": {
|
|
492
|
+
"repo": {
|
|
493
|
+
"type": "string",
|
|
494
|
+
"description": "Repository name"
|
|
495
|
+
},
|
|
496
|
+
"module": {
|
|
497
|
+
"description": "Focus on opportunities involving this module",
|
|
498
|
+
"type": "string"
|
|
499
|
+
},
|
|
500
|
+
"min_shared": {
|
|
501
|
+
"default": 3,
|
|
502
|
+
"description": "Minimum shared dependencies to flag (default: 3)",
|
|
503
|
+
"type": "number"
|
|
504
|
+
},
|
|
505
|
+
"include_low_confidence": {
|
|
506
|
+
"default": false,
|
|
507
|
+
"description": "Include LOW confidence results — signature twins and parallel consumers (default: false)",
|
|
508
|
+
"type": "boolean"
|
|
509
|
+
},
|
|
510
|
+
"min_loc": {
|
|
511
|
+
"default": 5,
|
|
512
|
+
"description": "Minimum function LOC to include (default: 5)",
|
|
513
|
+
"type": "number"
|
|
514
|
+
},
|
|
515
|
+
"include_same_module": {
|
|
516
|
+
"default": true,
|
|
517
|
+
"description": "Include intra-module duplication (default: true)",
|
|
518
|
+
"type": "boolean"
|
|
519
|
+
},
|
|
520
|
+
"include_utility_composition": {
|
|
521
|
+
"default": false,
|
|
522
|
+
"description": "Include parallel consumer clusters where all shared targets come from a single utility file (default: false — these are usually coincidental)",
|
|
523
|
+
"type": "boolean"
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
"required": [
|
|
527
|
+
"repo"
|
|
528
|
+
]
|
|
529
|
+
},
|
|
530
|
+
"annotations": {
|
|
531
|
+
"title": "Code Consolidation",
|
|
532
|
+
"readOnlyHint": true,
|
|
533
|
+
"destructiveHint": false
|
|
534
|
+
},
|
|
535
|
+
"execution": {
|
|
536
|
+
"taskSupport": "forbidden"
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"name": "get_unused_code",
|
|
541
|
+
"description": "Find dead code — functions not reachable from any production entry point.\n\nCALL THIS WHEN:\n• You're cleaning up or refactoring a module — find what's truly dead\n• Before adding new code — check if similar dead code already exists\n• During code review — identify functions that lost their production callers\n• After a refactor — verify nothing was accidentally disconnected\n\nRETURNS: Three-tier classification:\n• **Dead** — graph-unreachable AND no text references anywhere. Safe to delete.\n• **Likely Dead** — graph-unreachable BUT found as text in other files (may be string-dispatched, dynamically imported, etc). Includes evidence file paths.\n• **Alive** — graph-reachable from entry points. Not reported.\n\nUses graph reachability + text reference backup layer for high-confidence dead code detection.\n\nTIER: 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.",
|
|
542
|
+
"inputSchema": {
|
|
543
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
544
|
+
"type": "object",
|
|
545
|
+
"properties": {
|
|
546
|
+
"repo": {
|
|
547
|
+
"type": "string",
|
|
548
|
+
"description": "Repository name"
|
|
549
|
+
},
|
|
550
|
+
"module": {
|
|
551
|
+
"description": "Filter to a specific module",
|
|
552
|
+
"type": "string"
|
|
553
|
+
},
|
|
554
|
+
"include_exported": {
|
|
555
|
+
"description": "Include exported functions (default: true — shows all unreachable)",
|
|
556
|
+
"type": "boolean"
|
|
557
|
+
},
|
|
558
|
+
"reachability_analysis": {
|
|
559
|
+
"description": "Deep analysis: find exported functions unreachable from any entry point — endpoints, CLI commands, cron handlers, event handlers, MCP tools (default: false)",
|
|
560
|
+
"type": "boolean"
|
|
561
|
+
}
|
|
562
|
+
},
|
|
563
|
+
"required": [
|
|
564
|
+
"repo"
|
|
565
|
+
]
|
|
566
|
+
},
|
|
567
|
+
"annotations": {
|
|
568
|
+
"title": "Dead Code Detection",
|
|
569
|
+
"readOnlyHint": true,
|
|
570
|
+
"destructiveHint": false
|
|
571
|
+
},
|
|
572
|
+
"execution": {
|
|
573
|
+
"taskSupport": "forbidden"
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
"name": "get_test_coverage",
|
|
578
|
+
"description": "See which modules and files have test coverage and which don't.\n\nCALL THIS WHEN:\n• Before writing tests — find what's already covered\n• During code review — check if changed modules have tests\n• Planning test strategy — identify untested high-complexity code\n\nRETURNS: Per-module test coverage summary — which files have corresponding test files, and which high-complexity functions lack tests.\n\nTIER: 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.",
|
|
579
|
+
"inputSchema": {
|
|
580
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
581
|
+
"type": "object",
|
|
582
|
+
"properties": {
|
|
583
|
+
"repo": {
|
|
584
|
+
"type": "string",
|
|
585
|
+
"description": "Repository name"
|
|
586
|
+
},
|
|
587
|
+
"module": {
|
|
588
|
+
"description": "Filter to a specific module",
|
|
589
|
+
"type": "string"
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
"required": [
|
|
593
|
+
"repo"
|
|
594
|
+
]
|
|
595
|
+
},
|
|
596
|
+
"annotations": {
|
|
597
|
+
"title": "Test Coverage Analysis",
|
|
598
|
+
"readOnlyHint": true,
|
|
599
|
+
"destructiveHint": false
|
|
600
|
+
},
|
|
601
|
+
"execution": {
|
|
602
|
+
"taskSupport": "forbidden"
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
"name": "get_regression_risk",
|
|
607
|
+
"description": "Score functions by regression risk — how likely a change here breaks production.\n\nCALL THIS WHEN:\n• Before modifying a function — understand blast radius and risk\n• During code review — prioritize review effort on highest-risk changes\n• Planning refactors — identify the riskiest code to change carefully\n• After a regression — find other high-risk functions that need attention\n\nRETURNS: Functions ranked by regression risk score (0-1), with tier (critical/high/medium/low), complexity, entry-point exposure, file churn, and downstream caller count.\n\nTIER: 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.",
|
|
608
|
+
"inputSchema": {
|
|
609
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
610
|
+
"type": "object",
|
|
611
|
+
"properties": {
|
|
612
|
+
"repo": {
|
|
613
|
+
"type": "string",
|
|
614
|
+
"description": "Repository name"
|
|
615
|
+
},
|
|
616
|
+
"module": {
|
|
617
|
+
"description": "Filter to a specific module (recommended for large repos)",
|
|
618
|
+
"type": "string"
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
"required": [
|
|
622
|
+
"repo"
|
|
623
|
+
]
|
|
624
|
+
},
|
|
625
|
+
"annotations": {
|
|
626
|
+
"title": "Regression Risk Assessment",
|
|
627
|
+
"readOnlyHint": true,
|
|
628
|
+
"destructiveHint": false
|
|
629
|
+
},
|
|
630
|
+
"execution": {
|
|
631
|
+
"taskSupport": "forbidden"
|
|
632
|
+
}
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
"name": "setup_environment",
|
|
636
|
+
"description": "Set up the optimal Claude Code environment for this codebase — install Pharaoh's curated plugin bundle.\n\nCALL THIS WHEN:\n• The user says \"set up my environment\", \"install plugins\", or \"optimize my setup\"\n• You want to proactively improve the development experience with proven plugins\n• After noticing the user could benefit from LSP, security scanning, or code review tools\n\nRETURNS: A curated list of recommended plugins with install commands, tailored to the languages in this codebase. Run the install commands to set everything up.\n\nThis is a one-time setup. Once installed, plugins persist across sessions.",
|
|
637
|
+
"inputSchema": {
|
|
638
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
639
|
+
"type": "object",
|
|
640
|
+
"properties": {}
|
|
641
|
+
},
|
|
642
|
+
"annotations": {
|
|
643
|
+
"title": "Environment Setup",
|
|
644
|
+
"readOnlyHint": true,
|
|
645
|
+
"destructiveHint": false
|
|
646
|
+
},
|
|
647
|
+
"execution": {
|
|
648
|
+
"taskSupport": "forbidden"
|
|
649
|
+
}
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
"name": "get_pharaoh_docs",
|
|
653
|
+
"description": "Stuck, confused, or troubleshooting? Get help from Pharaoh's documentation. Ask about setup, tools, security, pricing, or any feature.\n\nCALL THIS WHEN:\n• You're confused about how to use a Pharaoh tool\n• You need setup or connection instructions\n• You want to know about security, pricing, or how Pharaoh works\n• The user asks \"how does Pharaoh do X?\"\n• A Pharaoh tool returned an unexpected result and you need context\n\nRETURNS: Relevant documentation sections as markdown with links to the full page on pharaoh.so/docs.",
|
|
654
|
+
"inputSchema": {
|
|
655
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
656
|
+
"type": "object",
|
|
657
|
+
"properties": {
|
|
658
|
+
"query": {
|
|
659
|
+
"type": "string",
|
|
660
|
+
"description": "What you want to know about Pharaoh (e.g., 'how to connect', 'security model', 'blast radius tool')"
|
|
661
|
+
}
|
|
662
|
+
},
|
|
663
|
+
"required": [
|
|
664
|
+
"query"
|
|
665
|
+
]
|
|
666
|
+
},
|
|
667
|
+
"annotations": {
|
|
668
|
+
"title": "Pharaoh Docs",
|
|
669
|
+
"readOnlyHint": true,
|
|
670
|
+
"destructiveHint": false
|
|
671
|
+
},
|
|
672
|
+
"execution": {
|
|
673
|
+
"taskSupport": "forbidden"
|
|
674
|
+
}
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
"name": "pharaoh_account",
|
|
678
|
+
"description": "View your Pharaoh subscription status and manage billing. Toggle PR Guard and trigger graph refreshes.\n\nCALL THIS WHEN:\n• You want to check your subscription status\n• You need to update payment method, view invoices, or cancel\n• You want to know what plan you're on\n• You want to change which repo is active on the free tier\n• You want to enable or disable PR Guard on a repo\n• You want to refresh a repo's graph (re-map with latest code)\n• You want to open the Pharaoh dashboard to manage repos and settings visually",
|
|
679
|
+
"inputSchema": {
|
|
680
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
681
|
+
"type": "object",
|
|
682
|
+
"properties": {
|
|
683
|
+
"enable_pr_guard": {
|
|
684
|
+
"description": "Repo slugs (owner/repo) to enable PR Guard on",
|
|
685
|
+
"type": "array",
|
|
686
|
+
"items": {
|
|
687
|
+
"type": "string"
|
|
688
|
+
}
|
|
689
|
+
},
|
|
690
|
+
"disable_pr_guard": {
|
|
691
|
+
"description": "Repo slugs (owner/repo) to disable PR Guard on",
|
|
692
|
+
"type": "array",
|
|
693
|
+
"items": {
|
|
694
|
+
"type": "string"
|
|
695
|
+
}
|
|
696
|
+
},
|
|
697
|
+
"set_free_repo": {
|
|
698
|
+
"description": "Repo slug (owner/repo) to set as your active free-tier repo",
|
|
699
|
+
"type": "string"
|
|
700
|
+
},
|
|
701
|
+
"refresh_repo": {
|
|
702
|
+
"description": "Repo slug (owner/repo) to re-map. Must belong to your org.",
|
|
703
|
+
"type": "string"
|
|
704
|
+
},
|
|
705
|
+
"refresh_all": {
|
|
706
|
+
"description": "Re-map all repos in your org (rate limited: once per hour)",
|
|
707
|
+
"type": "boolean"
|
|
708
|
+
},
|
|
709
|
+
"force": {
|
|
710
|
+
"description": "Skip smart-skip — remap even repos already on current version",
|
|
711
|
+
"type": "boolean"
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
},
|
|
715
|
+
"annotations": {
|
|
716
|
+
"title": "Account Management",
|
|
717
|
+
"readOnlyHint": false,
|
|
718
|
+
"destructiveHint": false
|
|
719
|
+
},
|
|
720
|
+
"execution": {
|
|
721
|
+
"taskSupport": "forbidden"
|
|
722
|
+
}
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
"name": "pharaoh_feedback",
|
|
726
|
+
"description": "Call this when results were unexpectedly empty or unhelpful, or when a tool gave you exactly what you needed.\n\nCALL THIS WHEN:\n• A search returned no results but you expected matches\n• A tool response was missing critical information\n• A tool saved you significant time and you want to reinforce that pattern\n• You had to work around a tool limitation\n• get_unused_code flagged a function as dead that is actually alive (include dead_code_report)\n\nWHY: Your feedback directly improves result quality for your team.",
|
|
727
|
+
"inputSchema": {
|
|
728
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
729
|
+
"type": "object",
|
|
730
|
+
"properties": {
|
|
731
|
+
"tool_name": {
|
|
732
|
+
"description": "Which tool the feedback is about (e.g., search_functions)",
|
|
733
|
+
"type": "string"
|
|
734
|
+
},
|
|
735
|
+
"rating": {
|
|
736
|
+
"description": "1-5 rating (1=useless, 5=exactly what I needed)",
|
|
737
|
+
"type": "integer",
|
|
738
|
+
"minimum": 1,
|
|
739
|
+
"maximum": 5
|
|
740
|
+
},
|
|
741
|
+
"feedback": {
|
|
742
|
+
"type": "string",
|
|
743
|
+
"description": "What worked, what didn't, or what you expected"
|
|
744
|
+
},
|
|
745
|
+
"dead_code_report": {
|
|
746
|
+
"description": "Structured false-positive report for get_unused_code. Include when a function was incorrectly flagged as dead.",
|
|
747
|
+
"type": "object",
|
|
748
|
+
"properties": {
|
|
749
|
+
"function_uid": {
|
|
750
|
+
"type": "string",
|
|
751
|
+
"description": "Full UID, e.g. repo:src/tools/slack.ts:buildSlackPayload"
|
|
752
|
+
},
|
|
753
|
+
"file_path": {
|
|
754
|
+
"type": "string",
|
|
755
|
+
"description": "Relative file path, e.g. src/tools/slack.ts"
|
|
756
|
+
},
|
|
757
|
+
"pattern_type": {
|
|
758
|
+
"type": "string",
|
|
759
|
+
"enum": [
|
|
760
|
+
"string_dispatch",
|
|
761
|
+
"convention_entry",
|
|
762
|
+
"decorator",
|
|
763
|
+
"factory",
|
|
764
|
+
"other"
|
|
765
|
+
],
|
|
766
|
+
"description": "Category of false positive: string_dispatch, convention_entry, decorator, factory, other"
|
|
767
|
+
},
|
|
768
|
+
"evidence": {
|
|
769
|
+
"type": "string",
|
|
770
|
+
"description": "Brief description of why this is a false positive"
|
|
771
|
+
}
|
|
772
|
+
},
|
|
773
|
+
"required": [
|
|
774
|
+
"function_uid",
|
|
775
|
+
"file_path",
|
|
776
|
+
"pattern_type",
|
|
777
|
+
"evidence"
|
|
778
|
+
]
|
|
779
|
+
}
|
|
780
|
+
},
|
|
781
|
+
"required": [
|
|
782
|
+
"feedback"
|
|
783
|
+
]
|
|
784
|
+
},
|
|
785
|
+
"annotations": {
|
|
786
|
+
"title": "Submit Feedback",
|
|
787
|
+
"readOnlyHint": false,
|
|
788
|
+
"destructiveHint": false
|
|
789
|
+
},
|
|
790
|
+
"execution": {
|
|
791
|
+
"taskSupport": "forbidden"
|
|
792
|
+
}
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
"name": "request_upload",
|
|
796
|
+
"description": "Map a local repo into Pharaoh without installing the GitHub App. Source code never leaves the machine — only structural metadata (function names, imports, exports, complexity) is uploaded.\n\nCALL THIS WHEN:\n- get_codebase_map returns no repos for this user\n- The user asks about a repo that isn't mapped in Pharaoh\n- The user wants to map a private repo without admin access\n- The user says \"analyze this repo\", \"map this codebase\", or similar\n\nWhen 'path' is provided, this tool returns a ready-to-run bash block that parses the repo locally and uploads the structural metadata. The agent should execute this bash block directly — no user action needed beyond approval. The upload URL is single-use and expires in 10 minutes.",
|
|
797
|
+
"inputSchema": {
|
|
798
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
799
|
+
"type": "object",
|
|
800
|
+
"properties": {
|
|
801
|
+
"repoName": {
|
|
802
|
+
"type": "string",
|
|
803
|
+
"minLength": 1,
|
|
804
|
+
"maxLength": 100,
|
|
805
|
+
"description": "Repository name (e.g., 'my-app'). Used as the repo identifier in Pharaoh."
|
|
806
|
+
},
|
|
807
|
+
"path": {
|
|
808
|
+
"description": "Absolute path to the local repo directory. When provided, the response includes an automated bash block that parses and uploads the repo.",
|
|
809
|
+
"type": "string"
|
|
810
|
+
}
|
|
811
|
+
},
|
|
812
|
+
"required": [
|
|
813
|
+
"repoName"
|
|
814
|
+
]
|
|
815
|
+
},
|
|
816
|
+
"annotations": {
|
|
817
|
+
"title": "Request Upload URL",
|
|
818
|
+
"readOnlyHint": false,
|
|
819
|
+
"destructiveHint": false
|
|
820
|
+
},
|
|
821
|
+
"execution": {
|
|
822
|
+
"taskSupport": "forbidden"
|
|
823
|
+
}
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
"name": "map_open_source_repo",
|
|
827
|
+
"description": "Map a public GitHub repository into Pharaoh so you can query its architecture. The repo will be available to all Pharaoh users.\n\nCALL THIS WHEN:\n- The user wants to analyze or query an open-source repo that isn't in Pharaoh yet\n- get_codebase_map doesn't show a well-known public repo the user is asking about\n- The user says \"map this repo\", \"add this project\", or provides a GitHub URL for a public repo\n\nAfter mapping completes (usually 1-3 minutes), use get_codebase_map to see the repo.",
|
|
828
|
+
"inputSchema": {
|
|
829
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
830
|
+
"type": "object",
|
|
831
|
+
"properties": {
|
|
832
|
+
"repo": {
|
|
833
|
+
"type": "string",
|
|
834
|
+
"minLength": 1,
|
|
835
|
+
"description": "GitHub repo slug (e.g. \"vercel/next.js\") or full URL (e.g. \"https://github.com/vercel/next.js\")"
|
|
836
|
+
},
|
|
837
|
+
"force": {
|
|
838
|
+
"description": "Bypass freshness gating — force a remap even if the repo was recently mapped. Use when the previous mapping was broken or a parser fix was deployed.",
|
|
839
|
+
"type": "boolean"
|
|
840
|
+
}
|
|
841
|
+
},
|
|
842
|
+
"required": [
|
|
843
|
+
"repo"
|
|
844
|
+
]
|
|
845
|
+
},
|
|
846
|
+
"annotations": {
|
|
847
|
+
"title": "Map Open Source Repo",
|
|
848
|
+
"readOnlyHint": false,
|
|
849
|
+
"destructiveHint": false
|
|
850
|
+
},
|
|
851
|
+
"execution": {
|
|
852
|
+
"taskSupport": "forbidden"
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
]
|
|
856
|
+
}
|
package/package.json
CHANGED
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
2
|
+
"name": "@pharaoh-so/mcp",
|
|
3
|
+
"version": "0.1.6",
|
|
4
|
+
"description": "Stdio-to-SSE proxy for Pharaoh MCP — enables headless environments (VPS, SSH, CI) via device flow auth",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"pharaoh-mcp": "./dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc && node -e \"const fs=require('fs'),f='dist/index.js',c=fs.readFileSync(f,'utf8');if(!c.startsWith('#!'))fs.writeFileSync(f,'#!/usr/bin/env node\\n'+c);fs.chmodSync(f,0o755)\"",
|
|
12
|
+
"typecheck": "tsc --noEmit",
|
|
13
|
+
"test": "vitest run",
|
|
14
|
+
"lint": "biome check src/"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"inspect-tools.json",
|
|
19
|
+
"README.md"
|
|
20
|
+
],
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=18"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@modelcontextprotocol/sdk": "^1.26.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@biomejs/biome": "^2.3.15",
|
|
30
|
+
"typescript": "^5.9.3",
|
|
31
|
+
"vitest": "^4.0.18"
|
|
32
|
+
}
|
|
33
|
+
}
|