MCP tools reference
Every Pathrule MCP tool the assistant can call, grouped by purpose, with a one line description of what each does.
This page lists every tool Pathrule exposes over MCP, grouped by purpose. The assistant rarely needs all of them. Most sessions touch only pathrule_get_context plus one or two write tools. The rest are there when a job demands them.
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_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. |
pathrule_suggest_skill | Low commitment path. Files a skill suggestion in the Suggestions tab for a human to approve, instead of writing directly. |
For the authoring flow, see Writing skills.
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 is what feeds the team activity feed in Pathrule Web. 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. |
Suggestions are how Pathrule keeps the content tree from drifting. The assistant can claim a brief, propose a fix, and resolve it, all without leaving the editor.
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.