Skip to main content
Glama

insert_at_line

Insert text before or after a specified line in an Obsidian note, using 1-based line numbers to place content precisely.

Instructions

Insert text before or after a line number (1-based; see read_note line_numbers:true).

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": {
      "file": "<file>",
      "line": "<line>",
      "content": "<content>"
    },
    "name": "insert_at_line"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesNote path ("Folder/Note.md"), path without .md, note name, alias, or [[wikilink]]
lineYes
vaultNoVault name, id or folder path (see list_vaults). Default: OBSIDIAN_VAULT or the vault open in Obsidian.
contentYes
positionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and idempotentHint=false, so the safety profile is covered. The description adds the 1-based indexing convention, which is real behavioral information, but says nothing about whether insertion shifts subsequent lines, what happens at line 0 or beyond the end of the note, or whether the operation is atomic.

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?

A single compact sentence with the key indexing constraint and the dependency on read_note front-loaded. Nothing is padded or redundant.

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 5-parameter mutation tool with no output schema and only 40% schema coverage, the definition is thin: no statement about return value, success/failure signal, or behavior on invalid line numbers. The read_note pointer is helpful but does not fully cover what an agent needs to call this safely.

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 only 40%: file and vault are documented in the schema, while line, content, and position are not. The description compensates partly by explaining that line is 1-based and how to get it, and by mentioning before/after for position, but it never states the default for position and the schema's line minimum of 0 conflicts with the stated 1-based convention.

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?

States a specific verb (Insert) and resource (text at a line number), and the parenthetical clarifies the indexing convention. It does not explicitly distinguish itself from siblings like append_to_note, edit_note, or add_block_id, so an agent must infer when line-based insertion is preferable.

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

Usage Guidelines3/5

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

Points the agent to read_note with line_numbers:true as the way to obtain valid line numbers, which is genuinely useful workflow guidance. However, it gives no guidance on when to choose this over append_to_note/edit_note, and no mention of what happens with out-of-range line values.

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

Deploy Server

Other Tools