Serveur MCP

Pathrule

io.pathrule/pathrule-remote-mcp
Outils développeur Connaissance et documentation Public et accessible MCP 2025-11-25

Ce que fait ce MCP

Stores and retrieves path-scoped project memories, rules, skills, snapshots, and context for coding assistants and development workspaces.

pathrule_create_workspace
Create Pathrule Workspace
Create a new Pathrule workspace inside an organization. Cloud-only: writes the workspace row through the user's JWT (RLS enforces organization membership). Does NOT attach the workspace to a local folder, does NOT install any AI client config, and does NOT render CLAUDE.md/AGENTS.md or editor companion files — those steps require Pathrule Studio or CLI. After creation, call pathrule_setup with the returned workspace_id to fetch the bootstrap brief.
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['organization_id', 'name'], 'properties': {'name': {'type': 'string', 'maxLength': 120, 'minLength': 1, 'description': 'Human-readable workspace name (e.g. the project / repo display name).'}, 'git_remote_url': {'anyOf': [{'type': 'string', 'format': 'uri'}, {'type': 'null'}], 'description': "Optional git remote URL (HTTPS or SSH form). Stored for reference and surface matching; never used to access the user's machine."}, 'organization_id': {'type': 'string', 'format': 'uuid', 'description': 'Organization UUID from pathrule_list_organizations.'}, 'active_agent_targets': {'type': 'array', 'items': {'enum': ['claude-code', 'cursor', 'windsurf', 'codex', 'copilot'], 'type': 'string'}, 'description': "AI clients this workspace will be used from. Affects Desktop/CLI companion file rendering when those surfaces attach. Defaults to ['claude-code']."}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'data': {'type': 'object', 'required': ['workspace_id', 'name', 'organization_id', 'git_remote_url', 'active_agent_targets', 'created_at'], 'properties': {'name': {'type': 'string', 'description': 'Workspace name as stored.'}, 'created_at': {'type': 'string', 'description': 'Creation timestamp in ISO 8601.'}, 'workspace_id': {'type': 'string', 'description': 'UUID of the new workspace. Pass it to pathrule_setup next.'}, 'git_remote_url': {'type': ['string', 'null'], 'description': 'Stored git remote URL, or null.'}, 'organization_id': {'type': 'string', 'description': 'Organization the workspace was created under.'}, 'active_agent_targets': {'anyOf': [{'type': 'array', 'items': {'type': 'string'}}, {'type': 'null'}], 'description': 'AI clients this workspace is configured for.'}}, 'description': 'The created workspace row.', 'additionalProperties': True}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'next_step': {'description': 'The call to make next, as { tool, arguments }.'}, 'human_message': {'type': 'string', 'description': 'One-line summary of the result, safe to relay to the user verbatim.'}, 'local_runtime': {'type': 'object', 'required': ['cta'], 'properties': {'cta': {'type': 'string', 'description': 'Upgrade line to surface to the user when local Pathrule (Studio or CLI) would serve them better than Remote MCP.'}}, 'description': 'Present on tools that carry the local-runtime upgrade reminder.', 'additionalProperties': True}}, 'additionalProperties': True}
pathrule_delete_memory
Pathrule Delete Memory
Soft-delete a memory by default. Pass hard:true to permanently delete (requires workspace_admin). Cloud-only.
Destructif
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['workspace_id', 'memory_id'], 'properties': {'hard': {'type': 'boolean', 'description': 'False or omitted performs a soft delete. True permanently deletes and requires admin rights.'}, 'memory_id': {'type': 'string', 'format': 'uuid', 'description': 'Memory UUID to delete.'}, 'workspace_id': {'type': 'string', 'format': 'uuid', 'description': 'Workspace UUID from pathrule_list_workspaces.'}, 'expected_version_id': {'type': 'string', 'format': 'uuid', 'description': 'Optional optimistic-concurrency token from the existing record. Pass it when available to avoid overwriting a newer edit.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'data': {'description': 'Deleted memory: id, plus the title it had before deletion.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'human_message': {'type': 'string', 'description': 'One-line summary of the result, safe to relay to the user verbatim.'}}, 'additionalProperties': True}
pathrule_delete_rule
Pathrule Delete Rule
Soft-delete a rule by default. hard:true requires workspace_admin. Cloud-only.
Destructif
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['workspace_id', 'rule_id'], 'properties': {'hard': {'type': 'boolean', 'description': 'False or omitted performs a soft delete. True permanently deletes and requires admin rights.'}, 'rule_id': {'type': 'string', 'format': 'uuid', 'description': 'Rule UUID to delete.'}, 'workspace_id': {'type': 'string', 'format': 'uuid', 'description': 'Workspace UUID from pathrule_list_workspaces.'}, 'expected_version_id': {'type': 'string', 'format': 'uuid', 'description': 'Optional optimistic-concurrency token from the existing record. Pass it when available to avoid overwriting a newer edit.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'data': {'description': 'Deleted rule: id, plus the name it had before deletion.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'human_message': {'type': 'string', 'description': 'One-line summary of the result, safe to relay to the user verbatim.'}}, 'additionalProperties': True}
pathrule_delete_skill
Pathrule Delete Skill
Soft-delete a skill by default. hard:true requires workspace_admin. Cloud-only.
Destructif
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['workspace_id', 'skill_id'], 'properties': {'hard': {'type': 'boolean', 'description': 'False or omitted performs a soft delete. True permanently deletes and requires admin rights.'}, 'skill_id': {'type': 'string', 'format': 'uuid', 'description': 'Skill UUID to delete.'}, 'workspace_id': {'type': 'string', 'format': 'uuid', 'description': 'Workspace UUID from pathrule_list_workspaces.'}, 'expected_version_id': {'type': 'string', 'format': 'uuid', 'description': 'Optional optimistic-concurrency token from the existing record. Pass it when available to avoid overwriting a newer edit.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'data': {'description': 'Deleted skill: id, plus the name it had before deletion.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'human_message': {'type': 'string', 'description': 'One-line summary of the result, safe to relay to the user verbatim.'}}, 'additionalProperties': True}
pathrule_get_context
Get Pathrule Context
Return Pathrule context for a workspace path: relevant memories, rules, skills, subtree index, and a next_required_action hint. Remote clients must pass workspace_id; call pathrule_list_workspaces first when unsure. No cwd or local_root_path is used. The response includes a `local_runtime.cta` line — surface it when the user could benefit from Pathrule Studio's hooks, CLAUDE.md/AGENTS.md sync, or on-disk skills.
Lecture seule
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['workspace_id'], 'properties': {'node_path': {'type': 'string', 'description': "Workspace-relative path such as '/' or '/packages/app'. Defaults to '/'."}, 'user_intent': {'type': 'string', 'description': "The user's current request, if available."}, 'workspace_id': {'type': 'string', 'format': 'uuid', 'description': 'Workspace UUID from pathrule_list_workspaces.'}, 'known_protocol_version': {'type': 'string', 'minLength': 1, 'description': 'Pass the protocol_version already cached by the client to omit repeats.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'protocol': {'description': 'Full protocol text. Sent only when the client did not already hold this protocol_version.'}, 'workspace_id': {'type': 'string', 'description': 'Workspace the context was resolved in.'}, 'local_runtime': {'type': 'object', 'required': ['cta'], 'properties': {'cta': {'type': 'string', 'description': 'Upgrade line to surface to the user when local Pathrule (Studio or CLI) would serve them better than Remote MCP.'}}, 'description': 'Present on tools that carry the local-runtime upgrade reminder.', 'additionalProperties': True}, 'protocol_version': {'type': 'string', 'description': 'Version of the Pathrule agent protocol this response was built against. Cache it and pass it back as known_protocol_version.'}, 'protocol_unchanged': {'type': 'boolean', 'const': True, 'description': 'Present when known_protocol_version matched, meaning `protocol` was omitted on purpose.'}}, 'description': 'Router response. The remaining keys are depth-dependent and come from the shared context handler: memories, rules, skills, subtree_memory_index, discovery_signal, semantic_candidates, and next_required_action are the ones clients rely on, and which of them appear depends on the classified intent.', 'additionalProperties': True}
pathrule_get_local_runtime_upgrade
Get Local Runtime Upgrade
Explain what Pathrule CLI (power-user, terminal-first) and Pathrule Studio (GUI) unlock beyond Remote MCP. Call this when the user asks 'is there a better way?', 'why do I need to install something?', wants hook-level automation, or wants to compare surfaces. The response splits the pitch by audience (CLI for terminal-first, Pathrule Studio for GUI) and explains the real token-savings angle: hooks fire before every AI tool call and inject context for free, while remote MCP is manual mode where the AI spends tokens on each context fetch.
Lecture seule
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'properties': {}}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'data': {'type': 'object', 'required': ['cloud_connector_can', 'cta'], 'properties': {'cta': {'type': 'object', 'required': ['label', 'url', 'message'], 'properties': {'url': {'type': 'string', 'description': 'Download page URL.'}, 'label': {'type': 'string', 'description': 'Call-to-action label.'}, 'message': {'type': 'string', 'description': 'One-line upgrade message to relay to the user.'}}, 'description': 'Where to send a user who wants the local runtime.', 'additionalProperties': True}, 'why_upgrade': {'description': 'The token-cost argument for a local runtime.'}, 'cloud_connector_can': {'type': 'array', 'items': {'type': 'string'}, 'description': 'What Remote MCP alone can already do.'}, 'for_fast_gui_users_desktop': {'description': 'Pitch for GUI users (Pathrule Studio).'}, 'remote_mcp_stays_useful_for': {'description': 'Cases where Remote MCP remains the right surface.'}, 'for_power_users_cli_plus_web': {'description': 'Pitch for terminal-first users (Pathrule CLI).'}}, 'description': 'Surface comparison split by audience.', 'additionalProperties': True}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'human_message': {'type': 'string', 'description': 'One-line summary of the result, safe to relay to the user verbatim.'}}, 'additionalProperties': True}
pathrule_get_node
Get Node Detail
Return a single node plus ids for attached memories, rules, and skills. Requires workspace_id to prevent cross-workspace ambiguity.
Lecture seule
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['workspace_id', 'node_id'], 'properties': {'node_id': {'type': 'string', 'format': 'uuid', 'description': 'Tree node UUID.'}, 'workspace_id': {'type': 'string', 'format': 'uuid', 'description': 'Workspace UUID from pathrule_list_workspaces.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'workspace_id': {'type': 'string', 'description': 'Workspace the node belongs to. A node outside the requested workspace is reported as a not_found error instead.'}}, 'description': 'The node detail is spread onto the top level by the shared node handler: the node fields plus the ids of its attached memories, rules, and skills.', 'additionalProperties': True}
pathrule_get_refresh_brief
Get memory/rule refresh brief
Claim one refresh task and return the subject, stale-signal evidence, AI instructions, and any proposed patch. Call pathrule_list_pending_refreshes first to choose a refresh_id. Remote MCP can inspect cloud records only; use Desktop/CLI before claiming local source code was verified.
Lecture seule
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['refresh_id'], 'properties': {'refresh_id': {'type': 'string', 'format': 'uuid', 'description': 'Refresh task UUID from pathrule_list_pending_refreshes.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'signal': {'description': 'Why the item was flagged stale: { formulaId, humanReason, detectedAt, rawSignals }.'}, 'status': {'type': 'string', 'description': 'Task status after the claim.'}, 'subject': {'type': 'object', 'required': ['type', 'id', 'title', 'node_path', 'body'], 'properties': {'id': {'type': 'string', 'description': 'UUID of the memory or rule.'}, 'body': {'type': 'string', 'description': 'Current body of the subject, before any patch.'}, 'type': {'type': 'string', 'description': 'What is being refreshed: memory or rule.'}, 'title': {'type': 'string', 'description': 'Current title or name of the subject.'}, 'node_path': {'type': 'string', 'description': 'Workspace-relative path the subject lives at.'}}, 'description': 'The memory or rule this task proposes to update.', 'additionalProperties': True}, 'refresh_id': {'type': 'string', 'description': 'The refresh task now claimed by this client.'}, 'human_message': {'type': 'string', 'description': 'One-line summary of the result, safe to relay to the user verbatim.'}, 'local_runtime': {'type': 'object', 'required': ['cta'], 'properties': {'cta': {'type': 'string', 'description': 'Upgrade line to surface to the user when local Pathrule (Studio or CLI) would serve them better than Remote MCP.'}}, 'description': 'Present on tools that carry the local-runtime upgrade reminder.', 'additionalProperties': True}, 'proposed_patch': {'anyOf': [{}, {'type': 'null'}], 'description': 'A pre-drafted patch when one exists, otherwise null.'}, 'ai_instructions': {'type': 'string', 'description': 'What to do with this task, written for the agent.'}, 'local_runtime_required': {'anyOf': [{}, {'type': 'null'}], 'description': 'Non-null when the task needs local source inspection that Remote MCP cannot do. Do not claim it was applied in that case.'}}, 'additionalProperties': True}
pathrule_get_tree
Get Workspace Tree
Return the full Pathrule node tree for a workspace.
Lecture seule
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['workspace_id'], 'properties': {'workspace_id': {'type': 'string', 'format': 'uuid', 'description': 'Workspace UUID from pathrule_list_workspaces.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'nodes': {'type': 'array', 'items': {}, 'description': 'Every node in the workspace tree, each with its id, path, name, and parent linkage.'}}, 'additionalProperties': True}
pathrule_goto
Go To Node
Resolve a path/name/fuzzy target inside a workspace and return full content for that node plus a compact subtree memory index.
Lecture seule
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['workspace_id', 'target'], 'properties': {'target': {'type': 'string', 'description': "Node path, name, or fuzzy target such as '/apps/api' or 'auth'."}, 'workspace_id': {'type': 'string', 'format': 'uuid', 'description': 'Workspace UUID from pathrule_list_workspaces.'}, 'subtree_limit': {'type': 'integer', 'maximum': 500, 'minimum': 1, 'description': 'Maximum entries in the subtree memory index. Defaults to 50, capped at 500. Raise it only when the compact index is genuinely truncated.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'node': {'type': 'object', 'required': ['node_id', 'path', 'name'], 'properties': {'name': {'type': 'string', 'description': 'Node display name.'}, 'path': {'type': 'string', 'description': 'Workspace-relative path of the node.'}, 'node_id': {'type': 'string', 'description': 'Tree node UUID for the resolved target.'}}, 'description': 'The node the target resolved to.', 'additionalProperties': True}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'rules': {'type': 'array', 'items': {}, 'description': 'Active rules on the node, with full content. Obey these.'}, 'skills': {'type': 'array', 'items': {}, 'description': 'Active skills on the node, with full content.'}, 'memories': {'type': 'array', 'items': {}, 'description': 'Active memories on the node, with full content: id, title, content, source.'}, 'subtree_memory_index': {'description': 'Compact index of memories below the node: { entries, total, truncated }.'}}, 'additionalProperties': True}
pathrule_import_pattern
Pathrule Import Pattern
Import an official Pathrule pattern (a bundle of memories, rules, and skills) into the workspace when the user pastes a `::pathrule:package:<slug>` token. WORKFLOW: (1) First call with `dry_run: true` to see the pattern's `appliesTo` (stacks/packages/paths) and pieces WITHOUT writing. (2) Judge fit against THIS workspace. If it does NOT fit (e.g. an Expo pattern but the project has no Expo), STOP and ask the user whether and where to add it. (3) Choose the `node_path` base matching the user's structure (e.g. /apps/mobile); the pattern's paths re-root under it. (4) Call again without dry_run to write. Path-first + idempotent. Imported skills are tagged `pattern:<slug>`; the response lists each created id. Relay the returned human_message. Use pathrule_remove_pattern to undo. This is a pattern import, NOT a skill — do not run the find-skills protocol.
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['workspace_id', 'slug'], 'properties': {'slug': {'type': 'string', 'pattern': '^[a-z0-9][a-z0-9-]*$', 'description': "Pattern slug — the part after 'package:' in ::pathrule:package:<slug>."}, 'dry_run': {'type': 'boolean', 'description': "True returns the pattern's appliesTo + pieces WITHOUT writing. Use first to decide fit + base path."}, 'verbose': {'type': 'boolean', 'description': 'Set true for per-piece import detail. Default false (compact summary).'}, 'node_path': {'type': 'string', 'description': "Base path to re-root the whole bundle under, chosen to match this workspace. Omit only when the pattern's own paths already fit."}, 'workspace_id': {'type': 'string', 'format': 'uuid', 'description': 'Workspace UUID from pathrule_list_workspaces.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'slug': {'type': 'string', 'description': 'Pattern slug that was imported.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'skipped': {'description': 'Pieces not written, with the reason, for example an item that already existed.'}, 'imported': {'description': 'The pieces actually written, grouped by kind (memories, rules, skills).'}, 'applies_to': {'description': "The pattern's declared fit: stacks, packages, and paths it targets."}, 'human_message': {'type': 'string', 'description': 'One-line summary of the result, safe to relay to the user verbatim.'}}, 'description': 'Compact form by default. With verbose=true the full import record is spread onto the top level instead, and dry_run=true returns the same shape with nothing written.', 'additionalProperties': True}
pathrule_list_memories
List Memories
List active memories attached to a specific Pathrule tree node. Use pathrule_get_context, pathrule_goto, or pathrule_get_node first to discover the node_id. Returns compact previews only; call pathrule_read_memory with a memory_id when you need the full body.
Lecture seule
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['node_id'], 'properties': {'node_id': {'type': 'string', 'format': 'uuid', 'description': 'Tree node UUID returned by pathrule_get_node, pathrule_goto, or the workspace tree.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'memories': {'type': 'array', 'items': {'type': 'object', 'required': ['id', 'title', 'preview', 'node_id', 'updated_at'], 'properties': {'id': {'type': 'string', 'description': 'Memory UUID. Pass it to pathrule_read_memory for the full body.'}, 'title': {'type': 'string', 'description': 'Memory title.'}, 'node_id': {'type': 'string', 'description': 'Tree node the memory is attached to.'}, 'preview': {'type': 'string', 'description': 'First 160 characters of the body, not the full content.'}, 'updated_at': {'type': 'string', 'description': 'Last update timestamp in ISO 8601.'}}, 'additionalProperties': True}, 'description': 'Compact previews only. Read a full body with pathrule_read_memory.'}}, 'additionalProperties': True}
pathrule_list_organizations
List Pathrule Organizations
List Pathrule organizations the authenticated user belongs to. Use this before pathrule_create_workspace when you need to ask the user which organization the new workspace should live under. Returns id, name, slug, plan, subscription_status and the user's role per org.
Lecture seule
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'properties': {}}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'data': {'type': 'object', 'required': ['organizations', 'count'], 'properties': {'count': {'type': 'number', 'description': 'Number of organizations returned.'}, 'organizations': {'type': 'array', 'items': {'type': 'object', 'required': ['id', 'name', 'slug', 'plan', 'subscription_status', 'role'], 'properties': {'id': {'type': 'string', 'description': 'Organization UUID. Pass it to pathrule_create_workspace.'}, 'name': {'type': 'string', 'description': 'Organization name.'}, 'plan': {'type': 'string', 'description': 'Billing plan identifier.'}, 'role': {'type': 'string', 'description': "The authenticated user's role in this organization."}, 'slug': {'type': 'string', 'description': 'Organization slug.'}, 'subscription_status': {'type': 'string', 'description': 'Billing status of the organization.'}}, 'additionalProperties': True}, 'description': 'Organizations the authenticated user belongs to.'}}, 'description': 'Organization list and its size.', 'additionalProperties': True}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'human_message': {'type': 'string', 'description': 'One-line summary of the result, safe to relay to the user verbatim.'}}, 'additionalProperties': True}
pathrule_list_pending_refreshes
List pending memory/rule refresh tasks
List pending Pathrule refresh tasks for a workspace. Refresh tasks are cloud suggestions that may update stale memories or rules. Use this first, then call pathrule_get_refresh_brief with a returned refresh_id before deciding whether to reject or resolve the task.
Lecture seule
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['workspace_id'], 'properties': {'workspace_id': {'type': 'string', 'format': 'uuid', 'description': 'Workspace UUID from pathrule_list_workspaces.'}, 'include_in_progress': {'type': 'boolean', 'description': 'Include tasks already claimed by a client. Defaults to false for a clean todo list.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'total': {'type': 'number', 'description': 'Number of refresh tasks returned.'}, 'refreshes': {'type': 'array', 'items': {}, 'description': 'Pending refresh tasks. Each carries a refresh_id for pathrule_get_refresh_brief.'}, 'human_message': {'type': 'string', 'description': 'One-line summary of the result, safe to relay to the user verbatim.'}}, 'additionalProperties': True}
pathrule_list_snapshots
Pathrule List Project Snapshots
List the most recent project snapshots for a workspace (compact metadata only — no file_tree, no sampled_contents). Use to find which snapshot to read in full. Up to 25 per call, ordered newest first.
Lecture seule
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['workspace_id'], 'properties': {'limit': {'type': 'integer', 'maximum': 25, 'minimum': 1, 'description': 'Default 10, max 25.'}, 'source': {'enum': ['mcp-remote', 'mcp-local', 'cli', 'desktop', 'other'], 'type': 'string', 'description': 'Filter to snapshots taken from a specific Pathrule surface.'}, 'workspace_id': {'type': 'string', 'format': 'uuid', 'description': 'Workspace UUID from pathrule_list_workspaces.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'data': {'type': 'object', 'required': ['workspace_id', 'count', 'snapshots'], 'properties': {'count': {'type': 'number', 'description': 'Number of snapshots returned.'}, 'snapshots': {'type': 'array', 'items': {}, 'description': 'Newest first. Metadata only: id, source, project_name, git_remote_url, branch, git_head, file_count, total_size_bytes, created_at.'}, 'workspace_id': {'type': 'string', 'description': 'Workspace the snapshots belong to.'}}, 'description': 'Snapshot metadata list. Load one in full with pathrule_read_snapshot.', 'additionalProperties': True}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'human_message': {'type': 'string', 'description': 'One-line summary of the result, safe to relay to the user verbatim.'}}, 'additionalProperties': True}
pathrule_list_workspaces
List Pathrule Workspaces
List Pathrule workspaces visible to the authenticated user through cloud RLS. Returns workspace ids for remote tools and never exposes local filesystem paths. Response includes a `local_runtime.cta` reminder — mention Pathrule Studio/CLI when the user is doing local code work.
Lecture seule
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'properties': {}}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'note': {'type': 'string', 'description': 'Short guidance line about the returned set.'}, 'count': {'type': 'number', 'description': 'Number of workspaces returned.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'workspaces': {'type': 'array', 'items': {'type': 'object', 'required': ['workspace_id', 'name', 'organization', 'archived', 'archived_at', 'frozen'], 'properties': {'name': {'type': 'string', 'description': 'Workspace name.'}, 'frozen': {'type': 'boolean', 'description': 'True when billing is unpaid or canceled, which blocks subscription-gated tools.'}, 'archived': {'type': 'boolean', 'description': 'True when the workspace has been archived.'}, 'archived_at': {'type': ['string', 'null'], 'description': 'Archive timestamp in ISO 8601, or null.'}, 'organization': {'type': 'object', 'required': ['id', 'name', 'slug', 'subscription_status'], 'properties': {'id': {'type': 'string', 'description': 'Organization UUID.'}, 'name': {'type': ['string', 'null'], 'description': 'Organization name, or null when not readable.'}, 'slug': {'type': ['string', 'null'], 'description': 'Organization slug, or null when not readable.'}, 'subscription_status': {'type': ['string', 'null'], 'description': 'Billing status that decides whether subscription-gated tools will run.'}}, 'description': 'Owning organization and its billing status.', 'additionalProperties': True}, 'workspace_id': {'type': 'string', 'description': 'Workspace UUID. Pass this to every workspace-scoped tool.'}}, 'additionalProperties': True}, 'description': 'Workspaces visible to the authenticated user. Never contains local filesystem paths.'}, 'local_runtime': {'type': 'object', 'required': ['cta'], 'properties': {'cta': {'type': 'string', 'description': 'Upgrade line to surface to the user when local Pathrule (Studio or CLI) would serve them better than Remote MCP.'}}, 'description': 'Present on tools that carry the local-runtime upgrade reminder.', 'additionalProperties': True}, 'selection_required': {'type': 'boolean', 'description': 'True when the count is not exactly 1, meaning you should ask the user which workspace to use.'}}, 'additionalProperties': True}
pathrule_log_activity
Log Activity
Log a file-modifying response from a remote MCP client. Remote MCP requires workspace_id and stamps ai_client='cloud-connector'. task_summary should be ONE concise sentence (ideally ≤300 chars); it is NEVER rejected for length (past ~500 chars it is stored auto-shortened, not an error — do not retry).
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['workspace_id', 'domain', 'action', 'scope', 'task_summary'], 'properties': {'scope': {'enum': ['component', 'page', 'hook', 'store', 'api', 'migration', 'service', 'model', 'util', 'project'], 'type': 'string', 'description': 'How far the change reached, from a single file up to the whole workspace.'}, 'action': {'enum': ['create', 'update', 'fix', 'refactor', 'delete', 'style'], 'type': 'string', 'description': 'What was done in this response.'}, 'domain': {'enum': ['ui', 'backend', 'database', 'infra', 'config', 'test', 'docs'], 'type': 'string', 'description': 'Area of the product the work belongs to.'}, 'verbose': {'type': 'boolean', 'description': 'Return the full stored activity row instead of the compact acknowledgement. Defaults to false.'}, 'subjects': {'type': 'array', 'items': {'type': 'string'}, 'default': [], 'description': 'Up to 5 short keywords naming what was touched, for example ["oauth", "token-refresh"].'}, 'node_path': {'type': 'string', 'default': '/', 'description': 'Workspace-relative path the work happened at, for example /packages/app. Use the most specific path the change actually touched. Defaults to the workspace root.'}, 'task_summary': {'type': 'string', 'description': 'One concise sentence describing what this response actually changed. Never rejected for length: past the hard maximum it is stored auto-shortened, so do not retry a shorter version.'}, 'workspace_id': {'type': 'string', 'format': 'uuid', 'description': 'Workspace UUID from pathrule_list_workspaces.'}, 'files_touched': {'type': 'object', 'properties': {'total': {'type': 'number', 'description': 'Number of files modified in this response.'}, 'by_area': {'type': 'object', 'description': 'Workspace-relative file paths grouped by area, for example { "packages/app": ["src/main.ts"] }. The server normalizes and clamps these.', 'additionalProperties': {'type': 'array', 'items': {'type': 'string'}}}}, 'description': 'Which files changed. Tolerant by contract: a malformed value is dropped rather than rejected, so logging never fails on it.', 'additionalProperties': False}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'id': {'type': 'string', 'description': 'UUID of the stored activity row. Compact form only.'}, 'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'activity': {'description': 'The full stored activity row. Present only with verbose=true.'}, 'created_at': {'type': 'string', 'description': 'Insertion timestamp in ISO 8601. Compact form only.'}, 'human_message': {'type': 'string', 'description': 'One-line summary of the result, safe to relay to the user verbatim.'}, 'task_summary_chars': {'type': 'number', 'description': 'Length of the task_summary that was stored.'}, 'summary_over_target': {'type': 'boolean', 'description': 'True when task_summary exceeded the soft target. The row was still written, so do not retry.'}, 'task_summary_target_chars': {'type': 'number', 'description': 'Soft target length for task_summary.'}, 'task_summary_hard_max_chars': {'type': 'number', 'description': 'Length past which task_summary is stored auto-shortened. Never an error.'}}, 'additionalProperties': True}
pathrule_ping
Pathrule Cloud Ping
Sanity check that Pathrule Remote MCP is reachable. Cloud-safe: returns no local cwd. Response includes a `local_runtime.cta` line you can surface to the user when they ask about deeper Pathrule features.
Lecture seule
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'properties': {'message': {'type': 'string', 'description': 'Optional message to echo back.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'ts': {'type': 'string', 'description': 'Server timestamp in ISO 8601.'}, 'echo': {'type': ['string', 'null'], 'description': 'The `message` argument echoed back, or null when none was sent.'}, 'pong': {'type': 'boolean', 'const': True, 'description': 'Present and true when the endpoint answered.'}, 'cloud': {'type': 'boolean', 'description': 'Always true on Remote MCP. Marks the response as cloud-served, with no local cwd.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'version': {'type': 'string', 'description': 'Connector build identifier.'}, 'client_id': {'type': ['string', 'null'], 'description': 'OAuth client id of the calling MCP client, or null on an unauthenticated ping.'}, 'authenticated': {'type': 'boolean', 'description': 'Present and false only on the unauthenticated public ping.'}, 'local_runtime': {'type': 'object', 'required': ['cta'], 'properties': {'cta': {'type': 'string', 'description': 'Upgrade line to surface to the user when local Pathrule (Studio or CLI) would serve them better than Remote MCP.'}}, 'description': 'Present on tools that carry the local-runtime upgrade reminder.', 'additionalProperties': True}}, 'additionalProperties': True}
pathrule_read_memory
Read Memory
Read the full body and metadata for one Pathrule memory. Use this after pathrule_get_context, pathrule_goto, or pathrule_list_memories returns a memory_id. This reads cloud data only and does not inspect the user's local filesystem.
Lecture seule
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['memory_id'], 'properties': {'memory_id': {'type': 'string', 'format': 'uuid', 'description': 'Memory UUID returned by pathrule_get_context, pathrule_goto, or pathrule_list_memories.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'id': {'type': 'string', 'description': 'Memory UUID.'}, 'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'title': {'type': 'string', 'description': 'Memory title.'}, 'source': {'type': 'string', 'description': 'How the memory was authored, for example claude or manual.'}, 'content': {'type': 'string', 'description': 'Full memory body.'}, 'node_path': {'type': ['string', 'null'], 'description': 'Workspace-relative path of the node this memory hangs on.'}, 'updated_at': {'type': 'string', 'description': 'Last update timestamp in ISO 8601.'}, 'version_id': {'type': 'string', 'description': 'Optimistic-concurrency token. Pass it as expected_version_id to pathrule_update_memory.'}}, 'additionalProperties': True}
pathrule_read_rule
Read Rule
Read the full body and metadata for one Pathrule rule. Use this after pathrule_get_context, pathrule_goto, or pathrule_get_node returns a rule_id. Rules are instructions the AI should obey for a project path; this tool only reads the cloud rule record and does not modify anything.
Lecture seule
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['rule_id'], 'properties': {'rule_id': {'type': 'string', 'format': 'uuid', 'description': 'Rule UUID returned by pathrule_get_context, pathrule_goto, or pathrule_get_node.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'id': {'type': 'string', 'description': 'Rule UUID.'}, 'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'name': {'type': 'string', 'description': 'Rule name.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'content': {'type': 'string', 'description': 'Full rule body: the constraint to obey.'}, 'priority': {'type': 'string', 'description': 'One of high, medium, or low.'}, 'node_path': {'type': ['string', 'null'], 'description': 'Workspace-relative path the rule applies to.'}, 'scope_type': {'type': 'string', 'description': 'One of project, folder, or file_type.'}, 'updated_at': {'type': 'string', 'description': 'Last update timestamp in ISO 8601.'}, 'version_id': {'type': 'string', 'description': 'Optimistic-concurrency token. Pass it as expected_version_id to pathrule_update_rule.'}}, 'additionalProperties': True}
pathrule_read_skill
Read Skill
Read the approved snapshot for one Pathrule skill. Use this after pathrule_get_context, pathrule_goto, or pathrule_get_node returns a skill_id. Returns the cloud SKILL.md content for the AI to follow; it does not install or materialize files locally.
Lecture seule
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['skill_id'], 'properties': {'skill_id': {'type': 'string', 'format': 'uuid', 'description': 'Skill UUID returned by pathrule_get_context, pathrule_goto, or pathrule_get_node.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'id': {'type': 'string', 'description': 'Skill UUID.'}, 'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'name': {'type': 'string', 'description': 'Skill name, as invoked with ::name.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'source': {'type': 'string', 'description': 'One of manual, template, or github_ref.'}, 'content': {'type': 'string', 'description': 'Full SKILL.md body, including its frontmatter.'}, 'node_path': {'type': ['string', 'null'], 'description': 'Workspace-relative path the skill is attached to.'}, 'updated_at': {'type': 'string', 'description': 'Last update timestamp in ISO 8601.'}, 'version_id': {'type': 'string', 'description': 'Optimistic-concurrency token. Pass it as expected_version_id to pathrule_update_skill.'}}, 'additionalProperties': True}
pathrule_read_snapshot
Pathrule Read Project Snapshot
Load a single project snapshot in full or partial form. Defaults include file_tree and sampled_contents — pass include_file_tree=false / include_sampled_contents=false to keep the response compact when you only need metadata.
Lecture seule
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['workspace_id', 'snapshot_id'], 'properties': {'snapshot_id': {'type': 'string', 'format': 'uuid', 'description': 'Snapshot UUID from pathrule_list_snapshots.'}, 'workspace_id': {'type': 'string', 'format': 'uuid', 'description': 'Workspace UUID from pathrule_list_workspaces.'}, 'include_file_tree': {'type': 'boolean', 'description': 'Include the flat file/directory list. Defaults to true. Pass false to keep the response small.'}, 'include_sampled_contents': {'type': 'boolean', 'description': 'Include the truncated bodies of the sampled files. Defaults to true. Pass false when you only need metadata.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'data': {'description': 'The snapshot row. Which columns are present depends on include_file_tree and include_sampled_contents.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'human_message': {'type': 'string', 'description': 'One-line summary of the result, safe to relay to the user verbatim.'}}, 'additionalProperties': True}
pathrule_remove_pattern
Pathrule Remove Pattern
Remove a previously-imported Pathrule pattern bundle in one call — the reverse of pathrule_import_pattern. The pattern definition is the manifest, so this finds and deletes the memories/rules/skills whose titles match the pattern's pieces. Pass the SAME `node_path` base used at import (omit if the pattern's own paths were used). Pieces not found are reported, not errors (idempotent). Relay the returned human_message.
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['workspace_id', 'slug'], 'properties': {'slug': {'type': 'string', 'pattern': '^[a-z0-9][a-z0-9-]*$', 'description': "Pattern slug — the part after 'package:' in ::pathrule:package:<slug>."}, 'verbose': {'type': 'boolean', 'description': 'Set true for per-piece detail. Default false (compact summary).'}, 'node_path': {'type': 'string', 'description': 'The base path the bundle was imported under. Must match the import to locate the pieces.'}, 'workspace_id': {'type': 'string', 'format': 'uuid', 'description': 'Workspace UUID from pathrule_list_workspaces.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'slug': {'type': 'string', 'description': 'Pattern slug that was removed.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'removed': {'description': 'The pieces actually deleted, grouped by kind.'}, 'not_found': {'description': 'Pieces the bundle declares that were not present under the given node_path.'}, 'human_message': {'type': 'string', 'description': 'One-line summary of the result, safe to relay to the user verbatim.'}}, 'description': 'Compact form by default. With verbose=true the full removal record is spread onto the top level instead.', 'additionalProperties': True}
pathrule_resolve_refresh
Close a memory/rule refresh task
Close a Pathrule refresh task after reviewing its brief. Normal remote flow: call pathrule_list_pending_refreshes, then pathrule_get_refresh_brief, then use this tool with status='rejected' when the signal is stale or not actionable. Remote MCP may refuse status='applied' because it cannot verify local source files; use Pathrule Studio/CLI for applied resolutions that require local verification.
Destructif
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['refresh_id', 'status'], 'properties': {'note': {'type': 'string', 'maxLength': 500, 'description': 'Short reason for the resolution, especially when rejecting a stale or unsafe refresh.'}, 'status': {'enum': ['applied', 'rejected'], 'type': 'string', 'description': "Use 'rejected' from Remote MCP when the signal is stale or cannot be safely applied. 'applied' may be refused unless local verification is available."}, 'refresh_id': {'type': 'string', 'format': 'uuid', 'description': 'Refresh task UUID returned by pathrule_list_pending_refreshes or pathrule_get_refresh_brief.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'status': {'type': 'string', 'description': 'Final status recorded for the task.'}, 'refresh_id': {'type': 'string', 'description': 'The refresh task that was resolved.'}, 'resolved_at': {'type': 'string', 'description': 'Resolution timestamp in ISO 8601.'}, 'human_message': {'type': 'string', 'description': 'One-line summary of the result, safe to relay to the user verbatim.'}}, 'additionalProperties': True}
pathrule_setup
Pathrule Setup
Fetch the active Pathrule bootstrap brief and execute it. Call this ONCE when the user asks to set up / bootstrap / initialize Pathrule for a project (e.g. 'Set up Pathrule for this project', 'Bootstrap Pathrule'). The response `body` is a prompt you must follow immediately — it tells you how to scan the project, propose memories/rules/skills, and write the approved items via pathrule_write_memory / _rule / _skill. Do NOT call this mid-task, for already-populated workspaces, or when the user just wants context — use pathrule_get_context for routine context lookups. If no workspace exists yet, call pathrule_list_organizations + pathrule_create_workspace first.
Lecture seule
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'properties': {'locale': {'type': 'string', 'maxLength': 8, 'minLength': 2, 'description': "Bootstrap brief language code. Defaults to 'en'. Pass 'tr' for Turkish users."}, 'workspace_id': {'type': 'string', 'format': 'uuid', 'description': 'Target workspace. Omit only if the user has not picked one yet — you should then call pathrule_create_workspace before continuing the bootstrap.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'data': {'type': 'object', 'required': ['version', 'locale', 'body', 'source', 'workspace_id'], 'properties': {'body': {'type': 'string', 'description': 'The bootstrap brief to execute, step by step.'}, 'locale': {'type': 'string', 'description': 'Locale the brief was served in.'}, 'source': {'type': 'string', 'description': 'Where the brief came from: cloud for the requested locale, fallback for the English default.'}, 'version': {'type': 'string', 'description': 'Bootstrap prompt version.'}, 'bootstrap_v2': {'anyOf': [{}, {'type': 'null'}], 'description': 'Reserved for the next bootstrap format. Currently null.'}, 'workspace_id': {'type': ['string', 'null'], 'description': 'Workspace the brief was scoped to, or null when called before a workspace exists.'}}, 'description': 'The bootstrap brief.', 'additionalProperties': True}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'human_message': {'type': 'string', 'description': 'One-line summary of the result, safe to relay to the user verbatim.'}, 'local_runtime': {'type': 'object', 'required': ['cta'], 'properties': {'cta': {'type': 'string', 'description': 'Upgrade line to surface to the user when local Pathrule (Studio or CLI) would serve them better than Remote MCP.'}}, 'description': 'Present on tools that carry the local-runtime upgrade reminder.', 'additionalProperties': True}}, 'additionalProperties': True}
pathrule_take_snapshot
Pathrule Project Snapshot
Record a point-in-time inventory of the user's project under a workspace. Remote MCP cannot see the filesystem, so YOU (the AI) collect this inventory with your own Read/Glob/Grep tools before calling this. Persist it so future setup, bootstrap, drift detection, and onboarding flows have structured evidence to reason over. Required: workspace_id. Strongly recommended: project_name, file_count, file_tree (cap at ~5000 entries — summarise deeper paths), file_extensions_summary, top_level_dirs, sampled_contents for README, package.json / pyproject.toml / Cargo.toml, CLAUDE.md, AGENTS.md, main config files (truncate each to ~4KB). Optional: git_head / branch / git_log_summary if you can read them, ai_notes for free-form observations.
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['workspace_id'], 'properties': {'branch': {'anyOf': [{'type': 'string', 'maxLength': 255}, {'type': 'null'}], 'description': 'Checked-out branch name at snapshot time.'}, 'source': {'enum': ['mcp-remote', 'mcp-local', 'cli', 'desktop', 'other'], 'type': 'string', 'description': "Which Pathrule surface produced this snapshot. Defaults to 'mcp-remote'."}, 'ai_notes': {'type': 'string', 'maxLength': 8192, 'description': 'Your own observations about the project structure, conventions, and obvious workspace seeds.'}, 'git_head': {'anyOf': [{'type': 'string', 'maxLength': 64}, {'type': 'null'}], 'description': 'Commit SHA that HEAD pointed at when the snapshot was taken.'}, 'metadata': {'type': 'object', 'description': 'Free-form additional structured data.', 'additionalProperties': {}}, 'file_tree': {'type': 'array', 'items': {'type': 'object', 'required': ['path', 'type'], 'properties': {'path': {'type': 'string', 'maxLength': 2048, 'minLength': 1}, 'size': {'type': 'integer', 'minimum': 0}, 'type': {'enum': ['file', 'dir'], 'type': 'string'}, 'depth': {'type': 'integer', 'minimum': 0}}, 'additionalProperties': False}, 'maxItems': 5000, 'description': 'Flat list of files/directories. Cap at 5000.'}, 'root_path': {'type': 'string', 'maxLength': 1024, 'description': "Absolute root path if the AI is running on the user's machine; otherwise omit."}, 'file_count': {'type': 'integer', 'minimum': 0, 'description': 'Total number of files inventoried, before any file_tree cap is applied.'}, 'project_name': {'type': 'string', 'maxLength': 255, 'description': 'Display name of the project, usually the repository or folder name.'}, 'workspace_id': {'type': 'string', 'format': 'uuid', 'description': 'Workspace UUID this snapshot belongs to.'}, 'git_remote_url': {'anyOf': [{'type': 'string', 'format': 'uri'}, {'type': 'null'}], 'description': 'Origin remote URL of the repository, or null when it has none.'}, 'top_level_dirs': {'type': 'array', 'items': {'type': 'object', 'required': ['name'], 'properties': {'name': {'type': 'string', 'maxLength': 255, 'minLength': 1}, 'file_count': {'type': 'integer', 'minimum': 0}}, 'additionalProperties': False}, 'maxItems': 200, 'description': 'Immediate child directories of the project root with their sizes, so future flows can see the shape of the tree without the full file list.'}, 'git_log_summary': {'type': 'string', 'maxLength': 32768, 'description': "Free-form summary of recent git activity if available (e.g. 'last 50 commits hot paths: src/foo.ts, src/bar.ts; bug fixes in api/')."}, 'sampled_contents': {'type': 'array', 'items': {'type': 'object', 'required': ['path', 'content'], 'properties': {'path': {'type': 'string', 'maxLength': 2048, 'minLength': 1}, 'bytes': {'type': 'integer', 'minimum': 0}, 'content': {'type': 'string', 'maxLength': 8192}}, 'additionalProperties': False}, 'maxItems': 50, 'description': 'Truncated contents of up to 50 important files (README, manifest files, CLAUDE.md/AGENTS.md, primary configs). Each content field capped at ~4096 bytes.'}, 'total_size_bytes': {'type': 'integer', 'minimum': 0, 'description': 'Combined size in bytes of the inventoried files.'}, 'file_extensions_summary': {'type': 'object', 'description': 'e.g. {"ts": 412, "tsx": 158, "json": 33}', 'additionalProperties': {'type': 'integer', 'minimum': 0}}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'data': {'type': 'object', 'required': ['snapshot_id', 'workspace_id', 'source', 'project_name', 'file_count', 'created_at', 'sampled_files_recorded', 'file_tree_entries_recorded'], 'properties': {'source': {'type': 'string', 'description': 'Pathrule surface that produced it.'}, 'created_at': {'type': 'string', 'description': 'Creation timestamp in ISO 8601.'}, 'file_count': {'type': ['number', 'null'], 'description': 'Recorded file count, or null.'}, 'snapshot_id': {'type': 'string', 'description': 'UUID of the stored snapshot. Pass it to pathrule_read_snapshot.'}, 'project_name': {'type': ['string', 'null'], 'description': 'Recorded project name, or null.'}, 'workspace_id': {'type': 'string', 'description': 'Workspace the snapshot belongs to.'}, 'sampled_files_recorded': {'type': 'number', 'description': 'How many sampled file bodies were actually stored after server-side trimming.'}, 'file_tree_entries_recorded': {'type': 'number', 'description': 'How many file-tree entries were stored.'}}, 'description': 'What was stored, including the counts after server-side trimming.', 'additionalProperties': True}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'human_message': {'type': 'string', 'description': 'One-line summary of the result, safe to relay to the user verbatim.'}}, 'additionalProperties': True}
pathrule_update_memory
Pathrule Update Memory
Update a memory's content or title, optionally moving it. Uses optimistic concurrency via expected_version_id. Cloud-only.
Destructif
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['workspace_id', 'memory_id', 'content'], 'properties': {'title': {'type': 'string', 'maxLength': 200, 'minLength': 1, 'description': 'Optional replacement memory title.'}, 'content': {'type': 'string', 'minLength': 1, 'description': 'Replacement memory body in clear project-language prose.'}, 'memory_id': {'type': 'string', 'format': 'uuid', 'description': 'Memory UUID returned by pathrule_get_context, pathrule_goto, or pathrule_read_memory.'}, 'move_to_path': {'type': 'string', 'description': 'Optional workspace-relative destination path such as /packages/app. Missing nodes are created when allowed by the backend.'}, 'workspace_id': {'type': 'string', 'format': 'uuid', 'description': 'Workspace UUID from pathrule_list_workspaces.'}, 'related_paths': {'anyOf': [{'type': 'array', 'items': {'type': 'string'}}, {'type': 'null'}], 'description': 'Optional list of workspace-relative paths this memory is also relevant to. null = unchanged. Pass [] to clear all manual links. Max 32 entries.'}, 'allow_duplicate': {'type': 'boolean', 'description': 'Set true only when intentionally allowing another memory with the same title.'}, 'expected_version_id': {'type': 'string', 'format': 'uuid', 'description': 'Optional optimistic-concurrency token from the existing record. Pass it when available to avoid overwriting a newer edit.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'data': {'description': 'Updated memory: id, version_id, and the title it now carries.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'human_message': {'type': 'string', 'description': 'One-line summary of the result, safe to relay to the user verbatim.'}}, 'additionalProperties': True}
pathrule_update_rule
Pathrule Update Rule
Update a rule's fields and/or path. Optimistic concurrency via expected_version_id. Cloud-only.
Destructif
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['workspace_id', 'rule_id', 'patch'], 'properties': {'patch': {'type': 'object', 'properties': {'name': {'type': 'string', 'maxLength': 200, 'minLength': 1, 'description': 'Replacement rule name.'}, 'content': {'type': 'string', 'minLength': 1, 'description': 'Replacement rule body.'}, 'priority': {'enum': ['high', 'medium', 'low'], 'type': 'string', 'description': 'Updated priority. Use high only when violating the rule causes real regressions.'}, 'scope_type': {'enum': ['folder', 'file_type', 'project'], 'type': 'string', 'description': 'Updated rule scope: project, folder, or file_type.'}}, 'description': 'Fields to change. Omitted fields are left as they are, so send only what actually differs.', 'additionalProperties': False}, 'rule_id': {'type': 'string', 'format': 'uuid', 'description': 'Rule UUID returned by pathrule_get_context, pathrule_goto, or pathrule_read_rule.'}, 'move_to_path': {'type': 'string', 'description': 'Optional workspace-relative destination path such as /packages/app. Missing nodes are created when allowed by the backend.'}, 'workspace_id': {'type': 'string', 'format': 'uuid', 'description': 'Workspace UUID from pathrule_list_workspaces.'}, 'allow_duplicate': {'type': 'boolean', 'description': 'Set true only when intentionally allowing another rule with the same name.'}, 'expected_version_id': {'type': 'string', 'format': 'uuid', 'description': 'Optional optimistic-concurrency token from the existing record. Pass it when available to avoid overwriting a newer edit.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'data': {'description': 'Updated rule: id, version_id, and the name it now carries.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'human_message': {'type': 'string', 'description': 'One-line summary of the result, safe to relay to the user verbatim.'}}, 'additionalProperties': True}
pathrule_update_skill
Pathrule Update Skill
Partially update an existing Pathrule skill record. Use pathrule_update_skill only when you already have a skill_id and want to change metadata, SKILL.md content, source/github_url, tags, or move the skill to another workspace path; use pathrule_write_skill to create a new skill, pathrule_read_skill to inspect the current body first, and pathrule_delete_skill to remove one. Requires an authenticated connector token with pathrule:write and an active workspace subscription. Side effects: writes the cloud skill record, may replace fields present in patch, may move the skill when move_to_path is set, and may fail on version conflict; it never installs files into .codex/skills, .claude/skills, or editor folders.
Destructif
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['workspace_id', 'skill_id', 'patch'], 'properties': {'patch': {'type': 'object', 'properties': {'name': {'type': 'string', 'maxLength': 200, 'minLength': 1, 'description': 'Replacement skill name.'}, 'tags': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Replacement discovery tag list.'}, 'source': {'enum': ['manual', 'template', 'github_ref'], 'type': 'string', 'description': 'Updated source type. Use github_ref only with a valid github_url.'}, 'content': {'type': 'string', 'minLength': 1, 'description': 'Replacement full SKILL.md content including frontmatter and markdown.'}, 'github_url': {'anyOf': [{'type': 'string', 'format': 'uri'}, {'type': 'null'}], 'description': 'Updated canonical GitHub URL for github_ref skills, or null to clear it.'}, 'description': {'type': ['string', 'null'], 'description': 'Replacement usage summary. Use null to clear it.'}}, 'description': 'Partial update object. Include only fields that should change; omitted fields keep their current values. At least one field should be present. Replacing content overwrites the stored approved SKILL.md body.', 'additionalProperties': False}, 'skill_id': {'type': 'string', 'format': 'uuid', 'description': 'Skill UUID returned by pathrule_get_context, pathrule_goto, or pathrule_read_skill.'}, 'move_to_path': {'type': 'string', 'description': 'Optional workspace-relative path to move the skill attachment, such as / or /packages/app. When provided, Pathrule moves the skill to that node and may create missing nodes; omit it to keep the current path.'}, 'workspace_id': {'type': 'string', 'format': 'uuid', 'description': 'Workspace UUID from pathrule_list_workspaces.'}, 'expected_version_id': {'type': 'string', 'format': 'uuid', 'description': "Optional version UUID from the current skill. Pass it after pathrule_read_skill to prevent overwriting someone else's newer edit; a stale value makes the update fail instead of silently replacing data."}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'data': {'description': 'Updated skill: id, version_id, and the name it now carries.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'human_message': {'type': 'string', 'description': 'One-line summary of the result, safe to relay to the user verbatim.'}}, 'additionalProperties': True}
pathrule_write_memory
Pathrule Write Memory
Create a new memory at a workspace path. Missing nodes auto-create. Blocks duplicate titles unless allow_duplicate is set. Cloud-only: never writes to the user's local filesystem. For automatic CLAUDE.md/AGENTS.md sync and on-disk hook injection alongside the write, install Pathrule Studio or CLI.
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['workspace_id', 'node_path', 'title', 'content'], 'properties': {'title': {'type': 'string', 'maxLength': 200, 'minLength': 1, 'description': 'Short specific title. It is the duplicate key for this node, so make it the thing being remembered, not a category.'}, 'source': {'enum': ['claude', 'manual'], 'type': 'string', 'description': 'Who authored the memory: claude when an agent wrote it, manual when the user dictated it. Defaults to claude.'}, 'content': {'type': 'string', 'minLength': 1, 'description': 'The memory body: the decision, convention, or bug pattern worth remembering, and why it matters.'}, 'node_path': {'type': 'string', 'minLength': 1, 'description': 'Workspace-relative path, e.g. /apps/api.'}, 'workspace_id': {'type': 'string', 'format': 'uuid', 'description': 'Workspace UUID from pathrule_list_workspaces.'}, 'related_paths': {'anyOf': [{'type': 'array', 'items': {'type': 'string'}}, {'type': 'null'}], 'description': 'Optional list of workspace-relative paths this memory is also relevant to. null = no links. Max 32 entries.'}, 'allow_duplicate': {'type': 'boolean', 'description': 'Set true only when a second memory with the same title on this node is intentional. Leave unset so near-duplicates are rejected.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'data': {'description': 'Created memory: id, title, node_id, node_path, version_id.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'warnings': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Non-fatal notices, for example a near-duplicate title that was allowed through.'}, 'human_message': {'type': 'string', 'description': 'One-line summary of the result, safe to relay to the user verbatim.'}}, 'additionalProperties': True}
pathrule_write_rule
Pathrule Write Rule
Create a new rule at a workspace path. Missing nodes auto-create. Use scope_type/priority honestly: high only when a violation causes a real bug or regression. Cloud-only — Pathrule Studio/CLI also renders the rule into the user's CLAUDE.md/AGENTS.md and editor companion files automatically.
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['workspace_id', 'node_path', 'name', 'content', 'scope_type', 'priority'], 'properties': {'name': {'type': 'string', 'maxLength': 200, 'minLength': 1, 'description': 'Short human-readable rule name.'}, 'content': {'type': 'string', 'minLength': 1, 'description': 'Rule body: the instruction agents must follow.'}, 'priority': {'enum': ['high', 'medium', 'low'], 'type': 'string', 'description': 'Use high only for rules whose violation causes bugs, security issues, or real regressions.'}, 'node_path': {'type': 'string', 'minLength': 1, 'description': 'Workspace-relative path where the rule applies, e.g. / or /packages/app.'}, 'scope_type': {'enum': ['folder', 'file_type', 'project'], 'type': 'string', 'description': 'Use project for global rules, folder for path-specific rules, or file_type when the rule targets a class of files.'}, 'workspace_id': {'type': 'string', 'format': 'uuid', 'description': 'Workspace UUID from pathrule_list_workspaces.'}, 'allow_duplicate': {'type': 'boolean', 'description': 'Set true only when intentionally allowing another rule with the same name.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'data': {'description': 'Created rule: id, name, node_id, node_path, version_id.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'human_message': {'type': 'string', 'description': 'One-line summary of the result, safe to relay to the user verbatim.'}}, 'additionalProperties': True}
pathrule_write_skill
Pathrule Write Skill
Create a new skill at a workspace path. Content is the full SKILL.md body (frontmatter + markdown). For github_ref skills set source='github_ref' and github_url. Cloud-only: does NOT materialize the skill into .codex/skills, .claude/skills, .cursor/skills, etc. — Pathrule Studio or CLI is required for on-disk skill materialization.
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['workspace_id', 'node_path', 'name', 'description', 'content'], 'properties': {'name': {'type': 'string', 'maxLength': 200, 'minLength': 1, 'description': 'Skill name, usually kebab-case.'}, 'tags': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Optional discovery tags such as frontend, database, or release.'}, 'source': {'enum': ['manual', 'template', 'github_ref'], 'type': 'string', 'description': 'Skill source type. Use github_ref only when github_url points to the canonical skill source.'}, 'content': {'type': 'string', 'minLength': 1, 'description': 'Full SKILL.md content including frontmatter and markdown.'}, 'node_path': {'type': 'string', 'minLength': 1, 'description': 'Workspace-relative path where the skill should be offered, e.g. / or /packages/app.'}, 'github_url': {'anyOf': [{'type': 'string', 'format': 'uri'}, {'type': 'null'}], 'description': 'Canonical GitHub URL for github_ref skills; null or omit for manual/template skills.'}, 'description': {'type': ['string', 'null'], 'description': 'Short summary of when agents should use this skill. Use null only if unknown.'}, 'workspace_id': {'type': 'string', 'format': 'uuid', 'description': 'Workspace UUID from pathrule_list_workspaces.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['ok'], 'properties': {'ok': {'type': 'boolean', 'description': 'true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.'}, 'data': {'description': 'Created skill: id, name, node_id, node_path, version_id.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable failure code, for example insufficient_scope, workspace_id_required, rate_limited, not_found, or upstream_error. Branch on this, not on message text.'}, 'detail': {'description': 'Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope.'}, 'message': {'type': 'string', 'description': 'Human-readable explanation of the failure.'}}, 'description': 'Present only when ok is false.', 'additionalProperties': True}, 'human_message': {'type': 'string', 'description': 'One-line summary of the result, safe to relay to the user verbatim.'}}, 'additionalProperties': True}
Ajouté
pathrule_get_local_runtime_upgrade
17 September 2026 12:53
Ajouté
pathrule_log_activity
17 September 2026 12:53
Ajouté
pathrule_resolve_refresh
17 September 2026 12:53
Ajouté
pathrule_get_refresh_brief
17 September 2026 12:53
Ajouté
pathrule_list_pending_refreshes
17 September 2026 12:53
Ajouté
pathrule_read_snapshot
17 September 2026 12:53
Ajouté
pathrule_list_snapshots
17 September 2026 12:53
Ajouté
pathrule_take_snapshot
17 September 2026 12:53
Ajouté
pathrule_setup
17 September 2026 12:53
Ajouté
pathrule_create_workspace
17 September 2026 12:53
Ajouté
pathrule_list_organizations
17 September 2026 12:53
Ajouté
pathrule_remove_pattern
17 September 2026 12:53
Ajouté
pathrule_import_pattern
17 September 2026 12:53
Ajouté
pathrule_delete_skill
17 September 2026 12:53
Ajouté
pathrule_update_skill
17 September 2026 12:53
Ajouté
pathrule_write_skill
17 September 2026 12:53
Ajouté
pathrule_delete_rule
17 September 2026 12:53
Ajouté
pathrule_update_rule
17 September 2026 12:53
Ajouté
pathrule_write_rule
17 September 2026 12:53
Ajouté
pathrule_delete_memory
17 September 2026 12:53
Ajouté
pathrule_update_memory
17 September 2026 12:53
Ajouté
pathrule_write_memory
17 September 2026 12:53
Ajouté
pathrule_read_skill
17 September 2026 12:53
Ajouté
pathrule_read_rule
17 September 2026 12:53
Ajouté
pathrule_read_memory
17 September 2026 12:53
Ajouté
pathrule_list_memories
17 September 2026 12:53
Ajouté
pathrule_get_node
17 September 2026 12:53
Ajouté
pathrule_get_tree
17 September 2026 12:53
Ajouté
pathrule_goto
17 September 2026 12:53
Ajouté
pathrule_get_context
17 September 2026 12:53