Skip to main content
Glama

akb_edit

Edit a single document by replacing exact text. Fails clearly if the text is missing or ambiguous, and supports insert, replace, or delete inline content without resending the document body.

Instructions

Edit a single document by replacing exact text. Scope is one document. old_string must be unique within the document (or use replace_all). If old_string is not found or appears multiple times, the call fails with a clear error. Use this for inserting, replacing, or removing an inline image without resending the complete document body. For find-and-replace across many documents, use akb_grep with replace instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uriYesDocument URI
messageNoCommit message describing the change
new_stringYesReplacement text. Can be empty to delete.
old_stringYesExact text to replace. Must be unique in the document body unless replace_all=true. Include surrounding context if needed for uniqueness.
base_commitNoOptional OCC pin — when set, the edit is rejected if the document's current_commit moved. Use after akb_get to fail-fast on concurrent writers.
replace_allNoReplace all occurrences (default: false, requires old_string to be unique)
_vault_skill_ackNoOpaque acknowledgement returned as vault_skill.ack_token. After applying that guide, retry the unchanged operation with this value. The bundled proxy supplies it automatically.

Schema Changelog

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

  1. Changed1 schema field changedv2.0.14
    • addedInput schema / properties / _vault_skill_ack
      Added value: +{
      +  "description": "Opaque acknowledgement returned as vault_skill.ack_token. After applying that guide, retry the unchanged operation with this value. The bundled proxy supplies it automatically.",
      +  "maxLength": 128,
      +  "type": "string"
      +}
  2. Addedv2.0.4
  3. Removedv2.0.1
  4. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It transparently describes failure behavior ('If old_string is not found or appears multiple times, the call fails with a clear error'), scope limitation, and the effect of replace_all. This is strong behavioral detail for a mutation tool.

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 compact and front-loaded with the core purpose, then constraints, then usage guidance and the alternative. Every sentence contributes value without redundancy.

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?

Given the 7-parameter schema with full coverage, the description is largely complete for selecting and invoking the tool. It could have explicitly named the full-document update alternative (e.g., akb_update or akb_put) and noted result/commit behavior, but what is present covers the main decision points.

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 baseline is 3. The description reinforces old_string uniqueness and replace_all behavior, but adds minimal parameter-level meaning beyond the schema, which already documents each parameter thoroughly.

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 states a specific verb and resource: 'Edit a single document by replacing exact text,' making the tool's core function immediately clear. It also distinguishes it from siblings by explicitly contrasting with akb_grep for multi-document find-and-replace and implying a difference from full-body update tools.

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 description gives explicit guidance: use this tool for targeted single-document edits, including inline image insert/replace/remove, and use akb_grep with replace for find-and-replace across many documents. It also clarifies that old_string must be unique unless replace_all is used, which is a concrete usage condition.

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

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/dnotitia/akb'

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