Skip to content

Ptah Tools

The built-in MCP server exposes a curated family of ptah_* tools. This page is the quick-reference catalog — grouped by purpose, with the “when to use” for each.

ToolPurposeTypical use case
ptah_workspace_analyzeProduce a structured analysis of the active workspace (frameworks, entry points, build system, tests)“What kind of project is this?” at the start of a new session
ptah_search_filesFast file search across the workspace with glob + content filtersLocate files by name or content without shelling out
ptah_get_diagnosticsPull current diagnostics (TS errors, linter warnings). Pass files to scope it”What’s broken right now?” before proposing fixes
ptah_get_dirty_filesList unsaved or modified filesSync model context with the user’s in-flight edits
ptah_count_tokensCount tokens for a string or file against the active model’s tokenizerBudget prompt size before a large call
ToolPurposeTypical use case
ptah_lsp_referencesFind all references to a symbolRefactoring impact analysis
ptah_lsp_definitionsJump to a symbol’s definitionTrace where a function or type is declared
ToolPurposeTypical use case
ptah_web_searchQuery the web through Ptah’s search provider”What’s the current best practice for X?”

A Playwright-backed browser the model can drive. Useful for scraping docs, verifying live pages, or end-to-end testing.

ToolPurposeTypical use case
ptah_browser_navigateOpen a URL in the managed browserStart a browsing session
ptah_browser_contentExtract the page’s rendered text or HTMLRead documentation, forum posts
ptah_browser_clickClick an element by selector or textDrive a UI to a specific state
ptah_browser_typeType into an inputFill forms, search boxes
ptah_browser_screenshotCapture a screenshotVisual debugging, design review
ptah_browser_evaluateRun JavaScript in page contextRead computed values, inspect the DOM
ptah_browser_networkInspect recent network requestsDebug API calls
ptah_browser_record_start / ptah_browser_record_stopRecord a browser session to videoProduce repro clips for bugs
ptah_browser_statusQuery browser stateCheck whether a page has finished loading
ptah_browser_closeClose the browserRelease resources

See Browser Automation for the full workflow.

Spawn, monitor, and control sub-agents from within a session.

ToolPurposeTypical use case
ptah_agent_listList available agentsDiscover which specialists are installed
ptah_agent_readRead an agent’s definitionInspect the prompt before spawning
ptah_agent_spawnSpawn a sub-agent with a taskParallelize multi-file work or delegate to a specialist
ptah_agent_statusCheck a running agent’s statusPoll for completion
ptah_agent_steerSend a mid-flight instruction to a running agentNudge a long-running task
ptah_agent_stopTerminate a running agentAbort runaway work

Keep experiments isolated without cluttering your main checkout.

ToolPurposeTypical use case
ptah_git_worktree_addCreate a new worktree for a branchSpin up an isolated sandbox for a refactor
ptah_git_worktree_listList existing worktreesAudit active experiments
ptah_git_worktree_removeRemove a worktreeClean up after merging
ToolPurposeTypical use case
ptah_json_validateValidate JSON against a schemaCheck config files before writing
ptah_harness_create_skillCreate a new skill as its own plugin at ~/.ptah/plugins/ptah-harness-<slug>/skills/<slug>/SKILL.md — see Harness pluginsCapture a reusable workflow on the fly
ptah_harness_search_skillsSearch local plugin skills and the skills.sh marketplace by keywordFind a skill by intent rather than name
ptah_harness_search_mcp_registrySearch the official MCP registry and Smithery (when a Smithery API key is configured)Discover third-party tools to plug in
ptah_harness_list_installed_mcpList every MCP server configured in the harnessAudit what’s connected
ptah_harness_install_mcp_serverWrite a server’s transport config into the target config filesAdd a discovered server to the workspace
ptah_harness_propose_configHand a partial harness config to the surface for the user to reviewFinish a harness build for approval

Both searches return three states, not two:

statusMeaning
okEvery source answered. An empty list means the catalogue genuinely has nothing.
degradedAt least one source failed. The list is incomplete and the tool call is flagged as an error.

The per-source detail is in sources: [{ source, status, count, error? }], where a source’s status is ok, unavailable (not configured on this machine) or failed. An empty result is only a true negative while the top-level status is ok.

limit on ptah_harness_search_mcp_registry bounds the merged list. Results are drawn round-robin across the three registries, so raising the limit never lets one source crowd out the others.

ptah_harness_search_skills takes limit and offset, which page the skills.sh half — local plugin results are a complete on-disk inventory and are never paged. The result echoes the window and adds:

  • hasMore — fetch the next page with offset += limit.
  • total — present only when the whole marketplace result set was seen. It is never estimated.
  • limitedByUpstream (on the skills.sh source entry) — the marketplace caps a single query at 200 rows. Past that no further page exists; narrow the query instead.

ptah_harness_create_skill takes scope:

scopeWritten toLoads in
user (default)~/.ptah/pluginsevery workspace on this machine
workspace{workspace}/.ptah/pluginsthis project only — commit it and it travels with the repo

A workspace-scoped skill sits beside .ptah/specs, so it can be checked in and shared with the team. Both scopes produce the same plugin id, so the same name cannot be used in both — the call is refused rather than letting the workspace copy silently shadow the global one.

ToolPurposeTypical use case
execute_codeRun code in the sandboxed runtime with scoped file and network accessTransform data, verify a snippet, run quick scripts
approval_promptRequest explicit user approval mid-executionGate side-effectful steps