Skip to main content
Glama

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesPattern slug — the part after 'package:' in ::pathrule:package:<slug>.
dry_runNoTrue returns the pattern's appliesTo + pieces WITHOUT writing. Use first to decide fit + base path.
verboseNoSet true for per-piece import detail. Default false (compact summary).
node_pathNoBase path to re-root the whole bundle under, chosen to match this workspace. Omit only when the pattern's own paths already fit.
workspace_idYesWorkspace UUID from pathrule_list_workspaces.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYestrue when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.
slugNoPattern slug that was imported.
errorNoPresent only when ok is false.
skippedNoPieces not written, with the reason, for example an item that already existed.
importedNoThe pieces actually written, grouped by kind (memories, rules, skills).
applies_toNoThe pattern's declared fit: stacks, packages, and paths it targets.
human_messageNoOne-line summary of the result, safe to relay to the user verbatim.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "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.",
      +  "properties": {
      +    "applies_to": {
      +      "description": "The pattern's declared fit: stacks, packages, and paths it targets."
      +    },
      +    "error": {
      +      "additionalProperties": true,
      +      "description": "Present only when ok is false.",
      +      "properties": {
      +        "code": {
      +          "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.",
      +          "type": "string"
      +        },
      +        "detail": {
      +          "description": "Optional structured context for the failure, for example { missing_scopes: [...] } on insufficient_scope."
      +        },
      +        "message": {
      +          "description": "Human-readable explanation of the failure.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "code",
      +        "message"
      +      ],
      +      "type": "object"
      +    },
      +    "human_message": {
      +      "description": "One-line summary of the result, safe to relay to the user verbatim.",
      +      "type": "string"
      +    },
      +    "imported": {
      +      "description": "The pieces actually written, grouped by kind (memories, rules, skills)."
      +    },
      +    "ok": {
      +      "description": "true when the call succeeded. false when it did not, in which case `error` carries the reason and the success fields are absent.",
      +      "type": "boolean"
      +    },
      +    "skipped": {
      +      "description": "Pieces not written, with the reason, for example an item that already existed."
      +    },
      +    "slug": {
      +      "description": "Pattern slug that was imported.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  2. Added

TDQS

A4.1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description states 'Path-first + idempotent', but the annotations declare `idempotentHint: false`. This is a direct contradiction. Even though the description otherwise discloses workflow behavior, the idempotency claim could mislead an agent into assuming repeated calls are safe when the annotations say otherwise.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is longer than average but every sentence earns its place: purpose, workflow steps, decision rules, return behavior, and exclusion guidance. The numbered WORKFLOW structure makes the multi-step process easy to follow without repetition or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter import tool with an output schema, the description covers the full decision path: dry-run inspection, fit judgment, base path selection, actual write, id listing, human_message relay, and undo via `pathrule_remove_pattern`. It also warns against treating this as a skill import. The only flaw is the idempotency contradiction, which is already accounted for in behavioral transparency.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds value above the schema by explaining the strategic role of `dry_run`, instructing how to pick `node_path` so paths re-root under the workspace structure, and clarifying that `slug` comes from the token after 'package:'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Import an official Pathrule pattern... into the workspace.' It clearly ties the tool to the `::pathrule:package:<slug>` token and explicitly distinguishes it from a skill import and from the find-skills protocol.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The WORKFLOW section gives explicit step-by-step guidance: call with `dry_run: true` first, judge fit, stop and ask if it doesn't fit, choose `node_path`, then call without `dry_run`. It also names `pathrule_remove_pattern` as the undo alternative, giving clear when-to-use and when-not-to-use context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.8/5.0
Disambiguation4/5

Tools are grouped by resource (memory/rule/skill/workspace/snapshot/refresh) and mostly have distinct output shapes, so agents can usually pick the right one. A few retrieval tools (get_context, get_node, get_tree, goto) overlap in purpose, but their descriptions clarify resolution mode vs full tree vs context bundle.

Naming Consistency3/5

All tools share the pathrule_ prefix and mostly follow verb_noun, but the verbs are inconsistent: create_workspace vs write_memory, get_node vs read_memory, delete_skill vs remove_pattern, plus verb-only exceptions like goto, setup, and ping. The pattern is readable but not uniform.

Tool Count2/5

32 tools is above the 25-tool threshold and feels heavy for a single server, even with a broad domain. Several context-retrieval tools and read/list variants could potentially be consolidated, though each tool does have a specific purpose.

Completeness4/5

Core CRUD is covered for memories, rules, and skills, along with workspaces, snapshots, refresh tasks, and pattern import/removal. Minor gaps include no standalone list_rules/list_skills and no snapshot update/delete, but agents can work around these via get_context, goto, and get_tree.

Resources