Skip to main content
Glama

open_document

Opens an existing document in the running Hillnote app and can scroll to and highlight a heading, text, or anchor so users see the exact section.

Instructions

Open an existing document in the running Hillnote app so the user can see it. To take the user to one part of it ("show me the Risks section", "where does it say…"), pass heading (or text / anchorId): the document opens, scrolls there and the spot is highlighted — never say you cannot show a section. Accepts the same document identifiers as read_document (id, title, fileName, or registry path). Does NOT create documents — call add_document first, then open it. If you plan to modify the currently open document, re-read it right before each edit (other agents or the user may be editing it too) and make targeted edits rather than rewriting the whole document.

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": {
      "workspace": "<workspace>",
      "document": "<document>"
    },
    "name": "open_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNoScroll to this exact text and highlight it (first occurrence).
targetNoWhere to open it. "main" (default) shows it in the main editor. "quickview" opens a read-only side panel and leaves the user's current document in place. heading, text and anchorId need "main".
headingNoScroll to this heading and highlight it (exact or partial match).
anchorIdNoScroll to this section anchor ([text]{#id} marks, or the fragment of a doc:…#id link) and highlight it.
documentYesDocument ID, title, fileName, or registry path
workspaceYesWorkspace path or name
focusWindowNoBring the Hillnote window to the front (default true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.19.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and mostly succeeds: it discloses that opening scrolls and highlights, that the app window and a read-only quickview mode exist, and that concurrent editing by other agents or the user is possible, motivating targeted edits. It does not cover failure behavior (e.g., document not found, ambiguous title) or what happens if the document is already open.

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?

Purpose and the strongest guidance are front-loaded, and each sentence carries practical information. It is somewhat dense for an open tool, and the parenthetical example quotes plus the edit-hygiene sentence stray toward advisory prose, but nothing is redundant filler.

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 7-parameter, no-output-schema tool with no annotations, the description covers purpose, targeting behavior, creation gating, and concurrent-edit caveats well. Remaining gaps are error/ambiguity handling and confirmation of what is returned after opening, which are minor for a UI-navigation tool.

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 parameter meanings are already documented in the schema, including the enum on target and the 'heading, text and anchorId need main' constraint. The description restates the accepted identifier types (id, title, fileName, registry path) that the schema already lists, adding little new semantics beyond tying them to read_document.

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 first sentence gives a specific verb and resource ('Open an existing document in the running Hillnote app') and states the user-visible effect. It also explicitly separates itself from the create path by naming add_document and saying 'Does NOT create documents', so an agent can distinguish it from a sibling without consulting schemas.

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?

It states when to pass heading/text/anchorId using realistic user phrasings ('show me the Risks section'), tells the agent never to claim it cannot show a section, notes that add_document must be called first for new documents, and advises re-reading before edits. Conditions and alternatives are explicit rather than inferred.

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