MCP and AI clients

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

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_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.
pathrule_suggest_skillLow 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

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 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

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.

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_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.