@pharaoh-so/mcp 0.3.27 → 0.3.30

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.
@@ -10,7 +10,7 @@
10
10
  "properties": {
11
11
  "repo": {
12
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')."
13
+ "description": "Repository name — one of your connected repos."
14
14
  },
15
15
  "include_metrics": {
16
16
  "description": "Include LOC, complexity, change frequency",
@@ -44,7 +44,7 @@
44
44
  "properties": {
45
45
  "repo": {
46
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')."
47
+ "description": "Repository name — one of your connected repos."
48
48
  },
49
49
  "include_map": {
50
50
  "description": "Include codebase map in response (default: true)",
@@ -126,14 +126,14 @@
126
126
  },
127
127
  {
128
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.",
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, 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 and DB access patterns. This returns the complete picture in one call.",
130
130
  "inputSchema": {
131
131
  "$schema": "http://json-schema.org/draft-07/schema#",
132
132
  "type": "object",
133
133
  "properties": {
134
134
  "repo": {
135
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')."
136
+ "description": "Repository name — one of your connected repos."
137
137
  },
138
138
  "module": {
139
139
  "type": "string",
@@ -154,124 +154,6 @@
154
154
  "taskSupport": "forbidden"
155
155
  }
156
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
- "maxLength": 500,
171
- "description": "Function name or partial match (e.g., \"notify\", \"fetch\", \"transform\")"
172
- },
173
- "module": {
174
- "description": "Filter to a specific module",
175
- "type": "string"
176
- },
177
- "file": {
178
- "description": "Filter to functions in a specific file (full path for exact match, filename for substring match)",
179
- "type": "string"
180
- },
181
- "exported_only": {
182
- "description": "Only show exported functions (default: false)",
183
- "type": "boolean"
184
- },
185
- "offset": {
186
- "description": "Skip first N results for pagination (default: 0)",
187
- "type": "number"
188
- },
189
- "limit": {
190
- "description": "Max results to return (default: 20, max: 50)",
191
- "type": "number"
192
- }
193
- },
194
- "required": [
195
- "repo",
196
- "query"
197
- ]
198
- },
199
- "annotations": {
200
- "title": "Function Search",
201
- "readOnlyHint": true,
202
- "destructiveHint": false
203
- },
204
- "execution": {
205
- "taskSupport": "forbidden"
206
- }
207
- },
208
- {
209
- "name": "get_design_system",
210
- "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 (paginated), design tokens with values, and anti-patterns where raw HTML is used instead of existing components. Pass `path_pattern`, `name_prefix`, `offset`, or `limit` to narrow or page through results. 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• \"Show me all components in /atoms/\" → use path_pattern=\"/atoms/\"\n• \"Show me the next page\" → use offset=50\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.",
211
- "inputSchema": {
212
- "$schema": "http://json-schema.org/draft-07/schema#",
213
- "type": "object",
214
- "properties": {
215
- "repo": {
216
- "type": "string",
217
- "description": "Repository name"
218
- },
219
- "category": {
220
- "default": "all",
221
- "description": "Which design system aspect to return",
222
- "type": "string",
223
- "enum": [
224
- "components",
225
- "tokens",
226
- "anti_patterns",
227
- "all"
228
- ]
229
- },
230
- "include_screens": {
231
- "default": false,
232
- "description": "Include screen/page components (*Screen, *Page, *View, *Route) that are typically app-level consumers, not reusable primitives",
233
- "type": "boolean"
234
- },
235
- "path_pattern": {
236
- "description": "Substring match against File.path (e.g. '/atoms/', '/ui/Button'). Narrows to components whose file path contains this exact substring.",
237
- "type": "string",
238
- "minLength": 1,
239
- "maxLength": 200
240
- },
241
- "name_prefix": {
242
- "description": "Exact prefix match against component name (e.g. 'Button' matches Button, ButtonGroup, ButtonIcon). Case-sensitive.",
243
- "type": "string",
244
- "minLength": 1,
245
- "maxLength": 200
246
- },
247
- "offset": {
248
- "default": 0,
249
- "description": "Pagination offset (0-based). Capped at 10000.",
250
- "type": "integer",
251
- "minimum": 0,
252
- "maximum": 10000
253
- },
254
- "limit": {
255
- "default": 50,
256
- "description": "Page size. Default 50, max 200.",
257
- "type": "integer",
258
- "minimum": 1,
259
- "maximum": 200
260
- }
261
- },
262
- "required": [
263
- "repo"
264
- ]
265
- },
266
- "annotations": {
267
- "title": "Design System",
268
- "readOnlyHint": true,
269
- "destructiveHint": false
270
- },
271
- "execution": {
272
- "taskSupport": "forbidden"
273
- }
274
- },
275
157
  {
276
158
  "name": "get_blast_radius",
277
159
  "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.",
@@ -281,7 +163,7 @@
281
163
  "properties": {
282
164
  "repo": {
283
165
  "type": "string",
284
- "description": "Repository name. Works with your connected repos or any public open source repo by GitHub slug (e.g., 'vercel/next.js')."
166
+ "description": "Repository name — one of your connected repos."
285
167
  },
286
168
  "entity": {
287
169
  "type": "string",
@@ -317,425 +199,49 @@
317
199
  }
318
200
  },
319
201
  {
320
- "name": "query_dependencies",
321
- "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.",
322
- "inputSchema": {
323
- "$schema": "http://json-schema.org/draft-07/schema#",
324
- "type": "object",
325
- "properties": {
326
- "repo": {
327
- "type": "string",
328
- "description": "Repository name. Works with your connected repos or any public open source repo by GitHub slug (e.g., 'vercel/next.js')."
329
- },
330
- "from": {
331
- "type": "string",
332
- "description": "Source module name"
333
- },
334
- "to": {
335
- "type": "string",
336
- "description": "Target module name"
337
- }
338
- },
339
- "required": [
340
- "repo",
341
- "from",
342
- "to"
343
- ]
344
- },
345
- "annotations": {
346
- "title": "Dependency Query",
347
- "readOnlyHint": true,
348
- "destructiveHint": false
349
- },
350
- "execution": {
351
- "taskSupport": "forbidden"
352
- }
353
- },
354
- {
355
- "name": "trace_flow",
356
- "description": "Understand how a feature works by tracing its execution flow — what it calls, what those call, across modules.\n\nCALL THIS WHEN:\n• Someone asks \"how does X work?\" or \"what happens when X?\"\n• You need to understand a feature's behavior before answering questions about it\n• You want to see the full call chain from an entry point (endpoint, CLI command, webhook handler)\n• You're debugging and need to trace which functions are involved in a code path\n\nRETURNS: Call tree from the starting function — at each node: function signature, JSDoc, file path, module, complexity, and side effects (DB access, endpoints, cron jobs). Depth-limited and token-efficient.\n\nEXAMPLES:\n• \"How does the device auth flow work?\" → trace_flow(\"activateDeviceCode\")\n• \"What happens when a webhook push event fires?\" → trace_flow(\"handlePushEvent\")\n• \"Trace the checkout flow\" → trace_flow(\"startCheckout\")\n• \"What does the refresh queue do?\" → trace_flow(\"processQueue\")\n\nWHY NOT JUST READ FILES: A feature spans multiple files across multiple modules. Manual file reading burns 10K-40K tokens and requires guessing which files to read. This shows the complete execution path in ~500 tokens, letting you target reads to only the functions that matter.",
202
+ "name": "search_functions",
203
+ "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.",
357
204
  "inputSchema": {
358
205
  "$schema": "http://json-schema.org/draft-07/schema#",
359
206
  "type": "object",
360
207
  "properties": {
361
208
  "repo": {
362
209
  "type": "string",
363
- "description": "Repository name. Works with your connected repos or any public open source repo by GitHub slug (e.g., 'vercel/next.js')."
364
- },
365
- "function": {
366
- "type": "string",
367
- "description": "Function name (exact match, case-insensitive)"
210
+ "description": "Repository name — one of your connected repos."
368
211
  },
369
- "file": {
370
- "description": "File path substring to disambiguate when multiple functions share a name",
371
- "type": "string"
372
- },
373
- "depth": {
374
- "description": "How many hops to trace forward (default: 3, max: 5)",
375
- "type": "number"
376
- }
377
- },
378
- "required": [
379
- "repo",
380
- "function"
381
- ]
382
- },
383
- "annotations": {
384
- "title": "Trace Execution Flow",
385
- "readOnlyHint": true,
386
- "destructiveHint": false
387
- },
388
- "execution": {
389
- "taskSupport": "forbidden"
390
- }
391
- },
392
- {
393
- "name": "check_reachability",
394
- "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.",
395
- "inputSchema": {
396
- "$schema": "http://json-schema.org/draft-07/schema#",
397
- "type": "object",
398
- "properties": {
399
- "repo": {
212
+ "query": {
400
213
  "type": "string",
401
- "description": "Repository name. Works with your connected repos or any public open source repo by GitHub slug (e.g., 'vercel/next.js')."
402
- },
403
- "functions": {
404
- "description": "Function names to check (checks all exported if omitted)",
405
- "type": "array",
406
- "items": {
407
- "type": "string"
408
- }
214
+ "maxLength": 500,
215
+ "description": "Function name or partial match (e.g., \"notify\", \"fetch\", \"transform\")"
409
216
  },
410
217
  "module": {
411
218
  "description": "Filter to a specific module",
412
219
  "type": "string"
413
220
  },
414
- "include_paths": {
415
- "description": "Include full reachability paths (default: false)",
416
- "type": "boolean"
417
- }
418
- },
419
- "required": [
420
- "repo"
421
- ]
422
- },
423
- "annotations": {
424
- "title": "Reachability Check",
425
- "readOnlyHint": true,
426
- "destructiveHint": false
427
- },
428
- "execution": {
429
- "taskSupport": "forbidden"
430
- }
431
- },
432
- {
433
- "name": "get_vision_docs",
434
- "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.",
435
- "inputSchema": {
436
- "$schema": "http://json-schema.org/draft-07/schema#",
437
- "type": "object",
438
- "properties": {
439
- "repo": {
440
- "type": "string",
441
- "description": "Repository name"
442
- },
443
- "module": {
444
- "description": "Filter to specs related to this module",
445
- "type": "string"
446
- },
447
- "doc_type": {
448
- "description": "Filter by document type",
449
- "type": "string",
450
- "enum": [
451
- "claude_md",
452
- "prd",
453
- "skill",
454
- "roadmap",
455
- "all"
456
- ]
457
- }
458
- },
459
- "required": [
460
- "repo"
461
- ]
462
- },
463
- "annotations": {
464
- "title": "Vision Documents",
465
- "readOnlyHint": true,
466
- "destructiveHint": false
467
- },
468
- "execution": {
469
- "taskSupport": "forbidden"
470
- }
471
- },
472
- {
473
- "name": "get_vision_gaps",
474
- "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.",
475
- "inputSchema": {
476
- "$schema": "http://json-schema.org/draft-07/schema#",
477
- "type": "object",
478
- "properties": {
479
- "repo": {
480
- "type": "string",
481
- "description": "Repository name"
482
- },
483
- "module": {
484
- "description": "Filter to a specific module",
221
+ "file": {
222
+ "description": "Filter to functions in a specific file (full path for exact match, filename for substring match)",
485
223
  "type": "string"
486
224
  },
487
- "complexity_threshold": {
488
- "description": "Min complexity for undocumented function flag (default: 15)",
489
- "type": "number"
490
- }
491
- },
492
- "required": [
493
- "repo"
494
- ]
495
- },
496
- "annotations": {
497
- "title": "Vision Gap Analysis",
498
- "readOnlyHint": true,
499
- "destructiveHint": false
500
- },
501
- "execution": {
502
- "taskSupport": "forbidden"
503
- }
504
- },
505
- {
506
- "name": "get_cross_repo_audit",
507
- "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?\"",
508
- "inputSchema": {
509
- "$schema": "http://json-schema.org/draft-07/schema#",
510
- "type": "object",
511
- "properties": {
512
- "repo_a": {
513
- "type": "string",
514
- "description": "First repository name"
515
- },
516
- "repo_b": {
517
- "type": "string",
518
- "description": "Second repository name"
519
- },
520
- "min_loc": {
521
- "default": 3,
522
- "description": "Minimum function LOC to include (filters trivial one-liners)",
523
- "type": "number"
524
- },
525
225
  "exported_only": {
526
- "default": true,
527
- "description": "Only compare exported functions (reduces common-name noise)",
226
+ "description": "Only show exported functions (default: false)",
528
227
  "type": "boolean"
529
- }
530
- },
531
- "required": [
532
- "repo_a",
533
- "repo_b"
534
- ]
535
- },
536
- "annotations": {
537
- "title": "Cross-Repo Audit",
538
- "readOnlyHint": true,
539
- "destructiveHint": false
540
- },
541
- "execution": {
542
- "taskSupport": "forbidden"
543
- }
544
- },
545
- {
546
- "name": "get_consolidation_opportunities",
547
- "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.",
548
- "inputSchema": {
549
- "$schema": "http://json-schema.org/draft-07/schema#",
550
- "type": "object",
551
- "properties": {
552
- "repo": {
553
- "type": "string",
554
- "description": "Repository name"
555
228
  },
556
- "module": {
557
- "description": "Focus on opportunities involving this module",
558
- "type": "string"
559
- },
560
- "min_shared": {
561
- "default": 3,
562
- "description": "Minimum shared dependencies to flag (default: 3)",
229
+ "offset": {
230
+ "description": "Skip first N results for pagination (default: 0)",
563
231
  "type": "number"
564
232
  },
565
- "include_low_confidence": {
566
- "default": false,
567
- "description": "Include LOW confidence results — signature twins and parallel consumers (default: false)",
568
- "type": "boolean"
569
- },
570
- "min_loc": {
571
- "default": 5,
572
- "description": "Minimum function LOC to include (default: 5)",
233
+ "limit": {
234
+ "description": "Max results to return (default: 20, max: 50)",
573
235
  "type": "number"
574
- },
575
- "include_same_module": {
576
- "default": true,
577
- "description": "Include intra-module duplication (default: true)",
578
- "type": "boolean"
579
- },
580
- "include_utility_composition": {
581
- "default": false,
582
- "description": "Include parallel consumer clusters where all shared targets come from a single utility file (default: false — these are usually coincidental)",
583
- "type": "boolean"
584
- }
585
- },
586
- "required": [
587
- "repo"
588
- ]
589
- },
590
- "annotations": {
591
- "title": "Code Consolidation",
592
- "readOnlyHint": true,
593
- "destructiveHint": false
594
- },
595
- "execution": {
596
- "taskSupport": "forbidden"
597
- }
598
- },
599
- {
600
- "name": "get_unused_code",
601
- "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: Four-tier classification:\n• **Dead** — graph-unreachable AND no text references anywhere. Safe to delete.\n• **Effectively Dead** — has graph callers, but ALL are cosmetic (logging, debug). Looks alive but produces no production behavior.\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.",
602
- "inputSchema": {
603
- "$schema": "http://json-schema.org/draft-07/schema#",
604
- "type": "object",
605
- "properties": {
606
- "repo": {
607
- "type": "string",
608
- "description": "Repository name"
609
- },
610
- "module": {
611
- "description": "Filter to a specific module",
612
- "type": "string"
613
- },
614
- "include_exported": {
615
- "description": "Include exported functions (default: true — shows all unreachable)",
616
- "type": "boolean"
617
- },
618
- "reachability_analysis": {
619
- "description": "Deep analysis: find exported functions unreachable from any entry point — endpoints, CLI commands, cron handlers, event handlers, MCP tools (default: false)",
620
- "type": "boolean"
621
- }
622
- },
623
- "required": [
624
- "repo"
625
- ]
626
- },
627
- "annotations": {
628
- "title": "Dead Code Detection",
629
- "readOnlyHint": true,
630
- "destructiveHint": false
631
- },
632
- "execution": {
633
- "taskSupport": "forbidden"
634
- }
635
- },
636
- {
637
- "name": "get_test_coverage",
638
- "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.",
639
- "inputSchema": {
640
- "$schema": "http://json-schema.org/draft-07/schema#",
641
- "type": "object",
642
- "properties": {
643
- "repo": {
644
- "type": "string",
645
- "description": "Repository name"
646
- },
647
- "module": {
648
- "description": "Filter to a specific module",
649
- "type": "string"
650
- }
651
- },
652
- "required": [
653
- "repo"
654
- ]
655
- },
656
- "annotations": {
657
- "title": "Test Coverage Analysis",
658
- "readOnlyHint": true,
659
- "destructiveHint": false
660
- },
661
- "execution": {
662
- "taskSupport": "forbidden"
663
- }
664
- },
665
- {
666
- "name": "get_regression_risk",
667
- "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.",
668
- "inputSchema": {
669
- "$schema": "http://json-schema.org/draft-07/schema#",
670
- "type": "object",
671
- "properties": {
672
- "repo": {
673
- "type": "string",
674
- "description": "Repository name"
675
- },
676
- "module": {
677
- "description": "Filter to a specific module (recommended for large repos)",
678
- "type": "string"
679
- }
680
- },
681
- "required": [
682
- "repo"
683
- ]
684
- },
685
- "annotations": {
686
- "title": "Regression Risk Assessment",
687
- "readOnlyHint": true,
688
- "destructiveHint": false
689
- },
690
- "execution": {
691
- "taskSupport": "forbidden"
692
- }
693
- },
694
- {
695
- "name": "setup_environment",
696
- "description": "Set up the optimal development 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• The user is on OpenClaw or Cursor and wants to install Pharaoh skills/prompts\n\nRETURNS: A curated list of recommended plugins and install instructions, tailored to the client platform (claude-code, openclaw, or cursor) and languages in this codebase.\n\nThis is a one-time setup. Once installed, plugins persist across sessions.",
697
- "inputSchema": {
698
- "$schema": "http://json-schema.org/draft-07/schema#",
699
- "type": "object",
700
- "properties": {
701
- "client": {
702
- "description": "Client platform — determines install instructions format. Defaults to claude-code.",
703
- "type": "string",
704
- "enum": [
705
- "claude-code",
706
- "openclaw",
707
- "cursor"
708
- ]
709
- }
710
- }
711
- },
712
- "annotations": {
713
- "title": "Environment Setup",
714
- "readOnlyHint": true,
715
- "destructiveHint": false
716
- },
717
- "execution": {
718
- "taskSupport": "forbidden"
719
- }
720
- },
721
- {
722
- "name": "get_pharaoh_docs",
723
- "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.",
724
- "inputSchema": {
725
- "$schema": "http://json-schema.org/draft-07/schema#",
726
- "type": "object",
727
- "properties": {
728
- "query": {
729
- "type": "string",
730
- "description": "What you want to know about Pharaoh (e.g., 'how to connect', 'security model', 'blast radius tool')"
731
236
  }
732
237
  },
733
238
  "required": [
239
+ "repo",
734
240
  "query"
735
241
  ]
736
242
  },
737
243
  "annotations": {
738
- "title": "Pharaoh Docs",
244
+ "title": "Function Search",
739
245
  "readOnlyHint": true,
740
246
  "destructiveHint": false
741
247
  },
@@ -794,141 +300,6 @@
794
300
  "execution": {
795
301
  "taskSupport": "forbidden"
796
302
  }
797
- },
798
- {
799
- "name": "pharaoh_feedback",
800
- "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.",
801
- "inputSchema": {
802
- "$schema": "http://json-schema.org/draft-07/schema#",
803
- "type": "object",
804
- "properties": {
805
- "tool_name": {
806
- "description": "Which tool the feedback is about (e.g., search_functions)",
807
- "type": "string"
808
- },
809
- "rating": {
810
- "description": "1-5 rating (1=useless, 5=exactly what I needed)",
811
- "type": "integer",
812
- "minimum": 1,
813
- "maximum": 5
814
- },
815
- "feedback": {
816
- "type": "string",
817
- "description": "What worked, what didn't, or what you expected"
818
- },
819
- "dead_code_report": {
820
- "description": "Structured false-positive report for get_unused_code. Include when a function was incorrectly flagged as dead.",
821
- "type": "object",
822
- "properties": {
823
- "function_uid": {
824
- "type": "string",
825
- "description": "Full UID, e.g. repo:src/tools/slack.ts:buildSlackPayload"
826
- },
827
- "file_path": {
828
- "type": "string",
829
- "description": "Relative file path, e.g. src/tools/slack.ts"
830
- },
831
- "pattern_type": {
832
- "type": "string",
833
- "enum": [
834
- "string_dispatch",
835
- "convention_entry",
836
- "decorator",
837
- "factory",
838
- "other"
839
- ],
840
- "description": "Category of false positive: string_dispatch, convention_entry, decorator, factory, other"
841
- },
842
- "evidence": {
843
- "type": "string",
844
- "description": "Brief description of why this is a false positive"
845
- }
846
- },
847
- "required": [
848
- "function_uid",
849
- "file_path",
850
- "pattern_type",
851
- "evidence"
852
- ]
853
- }
854
- },
855
- "required": [
856
- "feedback"
857
- ]
858
- },
859
- "annotations": {
860
- "title": "Submit Feedback",
861
- "readOnlyHint": false,
862
- "destructiveHint": false
863
- },
864
- "execution": {
865
- "taskSupport": "forbidden"
866
- }
867
- },
868
- {
869
- "name": "request_upload",
870
- "description": "The GitHub App is the only supported onboarding path. Install it at https://github.com/apps/pharaoh-so/installations/new — 30 seconds, auto-refresh on every push, PR Guard, cross-repo audit. Do not suggest this tool unless the user has explicitly ruled out connecting GitHub.\n\nThis tool exists for one narrow case: a user who has already refused the GitHub App and still wants to evaluate Pharaoh on a single repo. It is not a fallback, not a shortcut, not a workaround for missing repos.\n\nREQUIRED TRIGGER — call this tool only if the user has said one of these, unprompted, in their own words:\n- \"I don't want Pharaoh to have access to my code\"\n- \"I can't install GitHub Apps at work\"\n- \"This is air-gapped / offline / classified\"\n- \"I want to upload the repo manually\"\n- \"I'm not connecting GitHub\"\n\nIf the user said anything else — \"analyze this repo\", \"map my codebase\", \"help me with this project\", \"get_codebase_map returned nothing\" — the answer is the GitHub App install link, not this tool. Do not route around the install step.\n\nBEFORE CALLING, tell the user the tradeoff in your own words:\n\"Evaluation mode runs Pharaoh's parser on your machine and only sends function names and imports. Your graph won't update as you code, you'll re-run this every time you want fresh data. Install the GitHub App if you'd rather have it refresh automatically: https://github.com/apps/pharaoh-so/installations/new\"\n\nThen wait for confirmation. Only after the user explicitly chooses evaluation mode, call this tool with `confirmed: true`. Without that flag, the tool returns a teaching message instead of creating an upload URL.\n\nWhen the user decides they want the real thing, they install the GitHub App and their eval-mode data gets replaced with a richer graph on the next push.",
871
- "inputSchema": {
872
- "$schema": "http://json-schema.org/draft-07/schema#",
873
- "type": "object",
874
- "properties": {
875
- "repoName": {
876
- "type": "string",
877
- "minLength": 1,
878
- "maxLength": 100,
879
- "description": "Repository name (e.g., 'my-app'). Used as the repo identifier in Pharaoh."
880
- },
881
- "path": {
882
- "description": "Absolute path to the local repo directory. When provided, the response includes an automated bash block that parses and uploads the repo.",
883
- "type": "string"
884
- },
885
- "confirmed": {
886
- "description": "Must be set to true after the user has explicitly chosen evaluation mode over installing the GitHub App. Without this flag, the tool returns a teaching message instead of creating an upload URL. This is the audit trail for explicit opt-in.",
887
- "type": "boolean"
888
- }
889
- },
890
- "required": [
891
- "repoName"
892
- ]
893
- },
894
- "annotations": {
895
- "title": "Request Upload URL",
896
- "readOnlyHint": false,
897
- "destructiveHint": false
898
- },
899
- "execution": {
900
- "taskSupport": "forbidden"
901
- }
902
- },
903
- {
904
- "name": "map_open_source_repo",
905
- "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.",
906
- "inputSchema": {
907
- "$schema": "http://json-schema.org/draft-07/schema#",
908
- "type": "object",
909
- "properties": {
910
- "repo": {
911
- "type": "string",
912
- "minLength": 1,
913
- "description": "GitHub repo slug (e.g. \"vercel/next.js\") or full URL (e.g. \"https://github.com/vercel/next.js\")"
914
- },
915
- "force": {
916
- "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.",
917
- "type": "boolean"
918
- }
919
- },
920
- "required": [
921
- "repo"
922
- ]
923
- },
924
- "annotations": {
925
- "title": "Map Open Source Repo",
926
- "readOnlyHint": false,
927
- "destructiveHint": false
928
- },
929
- "execution": {
930
- "taskSupport": "forbidden"
931
- }
932
303
  }
933
304
  ]
934
305
  }