Skip to main content
Glama
knowledge-mcp

knowledge-mcp

by kvmadden

Insert text into memory file

memory.insert

Insert text at a 0-indexed line position within memory files. Content is screened before writing, blocking sensitive values from being stored.

Instructions

Insert text at a 0-indexed line position. The resulting file content is screened before the write.

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>",
      "insert_line": "<insert_line>",
      "insert_text": "<insert_text>"
    },
    "name": "memory.insert"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath under /memories.
insert_lineYes0 prepends; the line count appends.
insert_textYesText to insert.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations declare a non-read-only but non-destructive write, and the description adds genuinely new context: 'The resulting file content is screened before the write,' revealing a pre-write validation gate that could reject the operation. However, it does not say what happens when screening fails (error? no write?), nor that existing lines shift down, which is the key side effect of an insert.

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?

Two short sentences, zero filler, and the core positional semantics are front-loaded ahead of the secondary screening note. Nothing is redundant or buried.

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

Completeness3/5

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

For a 3-parameter mutation tool with no output schema, the description covers what it does and the screening behavior but omits the return value and the failure mode of screening. It is minimally adequate but leaves the agent guessing about outcome and error handling.

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 path, insert_line and insert_text are already documented in the schema, including the '0 prepends; the line count appends' behavior. The description's '0-indexed' restates schema content rather than adding syntax or format detail, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 ('Insert text at a 0-indexed line position') and names the memory file as the target via the path parameter constraint. It distinguishes itself adequately from memory.str_replace by emphasizing positional insertion, though it never names that sibling explicitly.

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

Usage Guidelines2/5

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

There is no when-to-use guidance: nothing says when to insert versus create a file or use str_replace, and no prerequisites or exclusions are stated. The agent must infer the choice purely from the word 'insert' and the positional semantics.

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