Pathrule
MCP and AI clients

MCP tools reference

Explore Pathrule MCP tools by runtime and purpose, including the shared content contract, local workflow tools, hosted Remote MCP additions and Studio-only bridges.


This page inventories Pathrule's MCP tools by capability. The assistant rarely needs all of them. Most sessions touch only pathrule_get_context plus one or two reads or writes. Local stdio, hosted Remote MCP and Studio then add only the operations their runtime can actually perform.

For the underlying model, see MCP overview.

Context and discovery

ToolPurpose
pathrule_get_contextThe primary entry point. Resolves the current working directory to a workspace node and returns the right slice of memories, rules, and skills for the task.
pathrule_get_treeReturns the workspace node tree (folders, files, contexts). Useful for discovery prompts.
pathrule_get_nodeFetches a single node plus its attached memories, rules, and skills.
pathrule_resolveMaps a known title or name to an id, path and version handle without walking the tree. A unique match can include the body in the same call. Local stdio.
pathrule_readBatch reads memory, rule and skill ids in one round trip, up to the server cap. Local stdio.
pathrule_gotoFuzzy resolves a name or path to a node id. Useful when the user names a target loosely.
pathrule_pingHealth check. Returns the runtime's view of the current working directory and a timestamp.
pathrule_setupBootstraps Pathrule in a new repo by proposing initial memories, rules, and skills the user can approve.

Most sessions start and end with pathrule_get_context. The response carries the workspace overview, the matching content ids, and a hint about which tool to call next. The assistant follows that hint rather than guessing.

Memory

ToolPurpose
pathrule_list_memoriesEnumerates the memories under a path with titles and short previews. The virtual MainMemory index.
pathrule_read_memoryReturns the full body of a memory by id, including the version token for optimistic concurrency.
pathrule_write_memoryCreates a memory at a node path. Missing nodes along the path auto create. Source defaults to claude when called over MCP.
pathrule_update_memoryEdits an existing memory. Requires expected_version_id so concurrent edits conflict cleanly.
pathrule_delete_memorySoft deletes a memory. Recoverable for thirty days.

The default flow is get_context to find the relevant memory id, then read_memory for the body if the assistant needs to cite it, and write_memory when the user asks to capture something.

Rule

ToolPurpose
pathrule_read_ruleReturns the full body of a rule by id.
pathrule_write_ruleCreates a rule at a node path with a scope type (folder, file_type, project) and a priority (high, medium, low).
pathrule_update_ruleEdits an existing rule with optimistic concurrency.
pathrule_delete_ruleSoft deletes a rule. Recoverable for thirty days.

Rules are workspace level and can be attached to multiple nodes through a join. Writing a rule at the same path twice should use update, not write, to avoid duplicates.

Skill

ToolPurpose
pathrule_read_skillReturns the full SKILL.md body of a skill by id. For github_ref skills it returns the cached snapshot.
pathrule_write_skillCreates a skill at a node path. Accepts the full SKILL.md including frontmatter. Source can be manual, template, or github_ref.
pathrule_update_skillEdits an existing skill with optimistic concurrency.
pathrule_delete_skillSoft deletes a skill. Recoverable for thirty days.

For the authoring flow, see Writing skills. An assistant drafts first and calls pathrule_write_skill after the user approves the body.

Patterns

ToolPurpose
pathrule_import_patternPreviews and imports a published bundle of memories, rules and skills at the chosen workspace path.
pathrule_remove_patternRemoves the pieces owned by a previously imported pattern bundle.

Activity

ToolPurpose
pathrule_log_activityLogs a structured record of a file modifying response. Required after every response that creates, edits, or deletes files. Fields: domain, action, scope, subjects, files_touched, task_summary.

The activity log feeds Studio's workspace activity and the derived learning layers. Logging one record per response (not per file) is the right granularity.

Suggestions and refresh

ToolPurpose
pathrule_list_pending_refreshesLists stale memory and rule items the self-audit has flagged.
pathrule_get_refresh_briefClaims a refresh task and returns the full repair context, including the audit reason and the assistant instructions.
pathrule_resolve_refreshMarks a refresh task applied or rejected. Closes the human in loop workflow.
pathrule_request_refreshFlags a memory or rule that the assistant found stale, contradictory, duplicated, too narrow or unclear during normal work.

Suggestions are how Pathrule keeps the content tree from drifting. The assistant can flag a concrete issue, claim a brief, propose a fix, and resolve it, all without leaving the editor.

Local lazy-write control

The local stdio server keeps read tools and pathrule_log_activity visible on startup. Write and admin tools are deferred in the default lazy mode so a read-only turn carries a smaller tool list.

ToolPurpose
pathrule_enable_writesEnables write, update, delete, pattern, setup and refresh-mutation tools for the rest of the MCP session. The server then emits tools/list_changed.

PATHRULE_MCP_TOOLS=all registers the full local set up front. Lazy mode removes nothing; it changes when mutation tools become visible.

Hosted Remote MCP additions

Remote MCP exposes the shared cloud-safe content and activity tools over OAuth, then adds hosted account operations:

ToolPurpose
pathrule_list_organizationsLists organizations visible to the signed-in user.
pathrule_list_workspacesLists workspaces available through the approved OAuth scope.
pathrule_create_workspaceCreates a hosted workspace before a local checkout exists.
pathrule_take_snapshotCaptures a workspace knowledge snapshot.
pathrule_list_snapshotsLists snapshots available to the workspace.
pathrule_read_snapshotReads one snapshot.
pathrule_get_local_runtime_upgradeReturns the supported path from a cloud connector to Studio or CLI when local delivery is needed.

Remote MCP also exposes setup, per-item reads and writes, patterns, refreshes and activity through the same shared names and shapes. It does not expose local batch helpers whose job depends on the stdio runtime's local workflow.

Tools that only exist inside a Studio session

Studio starts with the local Context Layer set above and can expose a second group to a session it started itself.

GroupPurpose
DesignRead the workspace's designs as intent (design_index, design_screen) and compare a rendered result against one (design_fidelity). See verifying a design.
RunStart the app target you selected in Studio, so the agent can bring a dev server or a build up itself instead of asking you to.
SimulatorDrive an iOS or Android simulator and read its accessibility tree, which is how a native screen gets observed.
TasksRead and move cards on the Tasks board.

Two properties are worth knowing:

  • They register only when Studio is on the other end. Each group appears only if Studio handed the process a run-bridge URL and token. Without those, tools/list does not return them, so your editor's own Pathrule MCP connection never has them.
  • They are a typed bridge, not a shell. There is no free-form command argument. A run tool names a target from a catalog Studio built; a simulator tool names a device and an action.

Conventions

A few conventions hold across the surface.

  • Path first writes. Write tools take a workspace relative node_path like /apps/api or /. If the path does not exist, intermediate nodes auto create.
  • Optimistic concurrency. Update tools require an expected_version_id. A mismatch returns a clear conflict response rather than overwriting.
  • Compact by default. Responses are compact for the common case. Pass verbose: true when you need the full record back.
  • Stable ids. Tool responses carry stable id and version_id values. The assistant can reference them in follow up calls without re reading the parent.