Skip to main content
Glama

Topos Begin Refactor

topos_begin_refactor
Idempotent

Capture a baseline snapshot of an untracked or uncommitted file before editing, then assess the change's quality using the returned snapshot ID.

Instructions

Persist the file's current source as a baseline snapshot before you edit it (writes a snapshot record — its only side effect).

Returns a snapshot_id; edit the file in place, then call topos_assess_snapshot(snapshot_id, filepath) to score the change without re-sending the baseline. Use this when the baseline is not a committed git revision (untracked/new files, or uncommitted prior edits); otherwise topos_assess_worktree_change needs no snapshot at all.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYesCapture a dirty/untracked baseline before editing.
Behavior4/5

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

Annotations indicate idempotentHint=true and destructiveHint=false. The description adds that writing a snapshot record is its only side effect and returns a snapshot_id. This aligns with annotations and provides extra context about the behavioral scope, though annotations already cover non-destructiveness.

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 description is two paragraphs with clear front-loading of the core action. It is efficient without wasted words, though the second paragraph could be slightly more compact. The use of backticks for code elements aids 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?

The description covers the tool's purpose, side effect, return value, usage context, and next step. With no output schema, it compensates by mentioning the snapshot_id. Input schema details are rich, and the distinction from siblings adds context. Minor gap: no mention of error conditions or expected side effects for edge cases.

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 coverage is 100%, so all parameters have individual descriptions. The description does not add parameter-level details beyond the schema. Baseline 3 is appropriate; no extra semantic value is provided for parameters.

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 clearly states the tool persists the file's current source as a baseline snapshot. The verb 'persist' and resource 'file's source' are specific. It also distinguishes from sibling `topos_assess_worktree_change` by specifying when this tool is appropriate, making its purpose distinct.

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?

Explicitly says 'Use this when the baseline is not a committed git revision' and provides alternative: 'otherwise topos_assess_worktree_change needs no snapshot at all.' Also gives next step: 'then call topos_assess_snapshot[s_nap]' which guides the agent on how to proceed after invocation.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Krv-Labs/topos'

If you have feedback or need assistance with the MCP directory API, please join our Discord server