Skip to main content
Glama
Archiware MCP

Archiware MCP

by mnott

index_sync

Copies P5 per-client backup indexes into the catalogue database so file-name searches run in seconds instead of scanning the full P5 index; incremental by default, with resumable and full sync options.

Instructions

Copies P5's per-client backup index (read-only, immutable sqlite on the P5 host, P5 is not disturbed) into the catalogue database (tables names, dirs, p5_dirs, p5_files, index_state) so find_file can search names in seconds instead of the ~5 minute scan of P5's own 9.5 GB files.db. Paths are rebuilt set-based (one recursive query), rows stream in batches of 200000. Incremental by default: only new element ids plus versions that ended since the last run; a killed run resumes. full:true rescans everything. detach:true runs it on the host (use for the first, ~84 million row sync); index_status shows progress and rows/s. Writes only to the catalogue database.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "index_sync"
  }
}

Input Schema

NameRequiredDescriptionDefault
fullNo
clientNoP5 client (default: every client with a backup index)
detachNo
noDtimeNoskip re-reading rows for versions that ended since the last run (faster, deleted-file status lags until the next full pass)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that the P5 source is read-only/immutable and not disturbed, that writes go only to the catalogue database, that runs are batched at 200000 rows and resume if killed, and that index_status tracks rows/s. It omits whether concurrent runs are prevented or whether catalogue reads see partial data mid-sync.

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

Conciseness4/5

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

Front-loaded with purpose and impact, then modes, then the write-scope caveat; every clause carries information. Sentences are dense and slightly run-on, which costs a little readability.

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?

For a mutation tool with no annotations and no output schema, it covers side effects, source safety, batching, resumption, and progress monitoring adequately. It lacks operational caveats about concurrency and whether mid-sync catalogue state is consistent for readers.

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 50%, and the description compensates by explaining the two undocumented parameters: full:true rescans everything and detach:true runs on the host for the large first sync. client and noDtime are already documented in the schema, so all four parameters have usable meaning, though 'full' gets only a one-clause explanation.

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 ('Copies P5's per-client backup index ... into the catalogue database'), names the destination tables, and explains the downstream payoff (find_file searches in seconds instead of a ~5 minute scan of a 9.5 GB files.db). This clearly separates it from index_status (progress) and find_file (consumer of the copied data).

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

Usage Guidelines4/5

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

Gives concrete run-mode guidance: incremental is the default, full:true rescans everything, and detach:true is recommended for the first ~84 million row sync with index_status for monitoring. It does not state exclusions, such as whether it is safe to run while find_file is querying or whether repeated runs are wasteful.

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