Skip to main content
Glama

register_file

Register files or folders created outside AIDrive with a purpose and retention period so they are tracked and checked for cleanup or extension.

Instructions

Register a file or folder you created on this computer outside AIDrive's own files (a scratch script, probe, report, export, temporary data, a build or package folder, a large artifact) with why it exists and how long it is needed (keep_days, default 3). AIDrive records the machine, absolute path, git worktree and branch, its kind and its measured size; build folders in bound folders are indexed automatically by the watcher; after the deadline the project brief checks whether the file still exists and asks the assistant to delete it or extend it. Registering the same path again updates it. Requires a files:write key.

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": {
      "path": "<path>",
      "purpose": "<purpose>"
    },
    "name": "register_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
keepNotrue: no deadline (a deliverable or a file the owner wants kept).
kindNotemp, build, package or artifact (default: detected for build and package folders, otherwise file).
pathYesThe file you created or will create on this computer (absolute, or relative to your working folder).
purposeYesWhy it exists, in one line, so the next assistant knows whether it is still needed.
sessionNoThe session that created it, if you know its id or name.
keep_daysNoHow many days it is needed (1-400, default 3). Omit with keep=true for files needed until someone decides.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1-alpha.2

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description does substantial work: it discloses the auth requirement ('Requires a files:write key'), the upsert/idempotency behavior, the default deadline (keep_days, default 3), and the post-deadline lifecycle (the project brief checks existence and asks the assistant to delete or extend). It never explicitly says the call itself only records metadata and does not touch the file on disk, which is the one behavioral point an agent might misread for a tool about deleting files.

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?

The core action and the off-AIDrive scoping are front-loaded, and the example list earns its space by concretizing what counts. The opening sentence is very long and clause-heavy, packing lifecycle, watcher behavior and auth into a dense run, so it reads as a wall rather than a scannable structure.

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 6-parameter recording tool with no annotations and no output schema, the definition covers the important unknowns: what is captured, idempotency, default lifetime, what happens at the deadline, and the required key. The main gap is that no return shape is described and the relationship to list_registered_files or the project-brief check is not spelled out, so an agent knows what the call does but not fully what it gets back.

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 the schema already documents path, purpose, keep, kind, keep_days and session. The description restates the keep_days default and the 'why it exists' intent of purpose, adding modest reinforcement rather than new meaning (e.g. it does not clarify the relative-vs-absolute path resolution or interaction between keep and keep_days beyond what the schema says). Baseline 3 applies when the schema carries the parameter burden.

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 ('Register a file or folder') and immediately scopes it: files created 'outside AIDrive's own files', with parenthetical examples (scratch script, probe, report, export, build folder, large artifact). That scoping separates it from create_file and file_history without needing to name them, and it also tells the agent what the register actually captures (machine, absolute path, git worktree and branch, kind, measured size).

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?

It gives clear context for when to use: after creating a scratch artifact or build folder outside AIDrive's files, and 'registering the same path again updates it' tells the agent it is safe to re-call rather than needing a separate update path. It also implies an exclusion by noting build folders in bound folders are indexed automatically by the watcher. It stops short of explicitly naming an alternative sibling or stating a hard 'do not use this when...' case.

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