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
| Tool | Purpose |
|---|---|
pathrule_get_context | The 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_tree | Returns the workspace node tree (folders, files, contexts). Useful for discovery prompts. |
pathrule_get_node | Fetches a single node plus its attached memories, rules, and skills. |
pathrule_resolve | Maps 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_read | Batch reads memory, rule and skill ids in one round trip, up to the server cap. Local stdio. |
pathrule_goto | Fuzzy resolves a name or path to a node id. Useful when the user names a target loosely. |
pathrule_ping | Health check. Returns the runtime's view of the current working directory and a timestamp. |
pathrule_setup | Bootstraps 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
| Tool | Purpose |
|---|---|
pathrule_list_memories | Enumerates the memories under a path with titles and short previews. The virtual MainMemory index. |
pathrule_read_memory | Returns the full body of a memory by id, including the version token for optimistic concurrency. |
pathrule_write_memory | Creates a memory at a node path. Missing nodes along the path auto create. Source defaults to claude when called over MCP. |
pathrule_update_memory | Edits an existing memory. Requires expected_version_id so concurrent edits conflict cleanly. |
pathrule_delete_memory | Soft 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
| Tool | Purpose |
|---|---|
pathrule_read_rule | Returns the full body of a rule by id. |
pathrule_write_rule | Creates a rule at a node path with a scope type (folder, file_type, project) and a priority (high, medium, low). |
pathrule_update_rule | Edits an existing rule with optimistic concurrency. |
pathrule_delete_rule | Soft 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
| Tool | Purpose |
|---|---|
pathrule_read_skill | Returns the full SKILL.md body of a skill by id. For github_ref skills it returns the cached snapshot. |
pathrule_write_skill | Creates a skill at a node path. Accepts the full SKILL.md including frontmatter. Source can be manual, template, or github_ref. |
pathrule_update_skill | Edits an existing skill with optimistic concurrency. |
pathrule_delete_skill | Soft 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
| Tool | Purpose |
|---|---|
pathrule_import_pattern | Previews and imports a published bundle of memories, rules and skills at the chosen workspace path. |
pathrule_remove_pattern | Removes the pieces owned by a previously imported pattern bundle. |
Activity
| Tool | Purpose |
|---|---|
pathrule_log_activity | Logs 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
| Tool | Purpose |
|---|---|
pathrule_list_pending_refreshes | Lists stale memory and rule items the self-audit has flagged. |
pathrule_get_refresh_brief | Claims a refresh task and returns the full repair context, including the audit reason and the assistant instructions. |
pathrule_resolve_refresh | Marks a refresh task applied or rejected. Closes the human in loop workflow. |
pathrule_request_refresh | Flags 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.
| Tool | Purpose |
|---|---|
pathrule_enable_writes | Enables 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:
| Tool | Purpose |
|---|---|
pathrule_list_organizations | Lists organizations visible to the signed-in user. |
pathrule_list_workspaces | Lists workspaces available through the approved OAuth scope. |
pathrule_create_workspace | Creates a hosted workspace before a local checkout exists. |
pathrule_take_snapshot | Captures a workspace knowledge snapshot. |
pathrule_list_snapshots | Lists snapshots available to the workspace. |
pathrule_read_snapshot | Reads one snapshot. |
pathrule_get_local_runtime_upgrade | Returns 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.
| Group | Purpose |
|---|---|
| Design | Read the workspace's designs as intent (design_index, design_screen) and compare a rendered result against one (design_fidelity). See verifying a design. |
| Run | Start 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. |
| Simulator | Drive an iOS or Android simulator and read its accessibility tree, which is how a native screen gets observed. |
| Tasks | Read 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/listdoes 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_pathlike/apps/apior/. 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: truewhen you need the full record back. - Stable ids. Tool responses carry stable
idandversion_idvalues. The assistant can reference them in follow up calls without re reading the parent.
What to read next
- MCP overview for the model behind the tool surface.
- How hooks work for the push layer that complements these pull calls.
- Writing memories, Writing rules, Writing skills for what to put inside the writes.