Skip to main content
Glama

palace_mine

Mine or re-sync a code repository directory into the palace, initializing palace.yaml on first run and updating file drawers for added, edited, and removed files.

Instructions

Mine (or re-sync) a CODE REPOSITORY directory into the palace (only after the user agrees). Repos only: chats or non-repo topics have no folder to mine, so use palace_create_wing for those. Accepting this implicitly initialises palace.yaml for first-time repos and then syncs files into the project's wing: new files are added, edited files are re-mined so their drawers reflect the latest content, unchanged files are left alone, and drawers for files deleted from disk are removed. The result's summary field reports new/updated/unchanged/removed file counts.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_path": "<project_path>"
    },
    "name": "palace_mine"
  }
}

Input Schema

NameRequiredDescriptionDefault
wingNoOverride the wing name (defaults to palace.yaml or the directory slug)
limitNoMax files to process (0 = no limit)
dry_runNoReport what would be mined without writing
project_pathYesAbsolute path to the project directory to mine

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.20.5

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it discloses implicit side effects (palace.yaml initialisation on first run), precise sync semantics for new/edited/unchanged files, and a destructive behavior (drawers removed for files deleted from disk). This is exactly the behavioral context an agent needs before invoking a mutation.

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?

Front-loaded with the purpose, then the exclusion/alternative, then the sync behavior, then the return value — a logical progression with no filler. The long middle sentence is dense but every clause conveys a distinct behavioral fact.

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

Completeness4/5

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

There is no output schema, and the description compensates by naming the `summary` field and the counts it reports. Combined with the disclosed sync and deletion semantics, an agent has enough to call this correctly; only per-parameter nuance (dry_run vs limit interaction) is left to the schema.

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

Parameters3/5

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

Schema description coverage is 100%, so wing, limit, dry_run and project_path are already documented. The description only loosely gestures at the wing concept ('syncs files into the project's wing') and adds no format, default, or interaction detail beyond the schema, so the baseline 3 applies.

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?

States a specific verb and resource ('Mine (or re-sync) a CODE REPOSITORY directory into the palace') and immediately scopes it to repos, contrasting with palace_create_wing for non-repo topics. An agent can distinguish this from the wing-creation sibling without opening either schema.

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?

Gives an explicit precondition ('only after the user agrees'), an explicit exclusion ('chats or non-repo topics have no folder to mine'), and names the alternative to use instead (palace_create_wing). Both when-to-use and when-not-to-use are covered.

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