Skip to main content
Glama

get_context

Read-only

Retrieve the user's current TrailMark view—open document, section, selection, reading/editing state, and unsaved edits—to resolve vague references like 'this' or 'here'.

Instructions

What the person is looking at in TrailMark right now: the open document (path relative to the project), whether they are reading or editing it, the section on screen (heading path and line range), the text they selected (with its section and lines) and whether it has unsaved edits. Call this when the person says "this", "here", "the selected text", "this section", "what I'm reading" or otherwise points at something on their screen without naming it. Needs TrailMark open on the project with its agent connection on; otherwise it says so.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Beyond readOnlyHint=true, it discloses the required runtime state (app open, agent connection active) and that the tool reports when that condition is unmet, which is genuine behavioral context an agent needs. It doesn't cover freshness/caching behavior, so not quite a 5.

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?

Content is front-loaded: what the tool returns first, then when to call it, then the precondition. The enumeration is dense but each clause carries information; slightly long for a no-argument tool.

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

Completeness5/5

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

There is no output schema, so the description must describe the returned payload, and it does so field by field (path, mode, heading path, line range, selection, unsaved edits). Combined with the stated precondition, an agent has everything needed to call and interpret it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so there is nothing for the description to clarify beyond the baseline. The enumeration of returned fields adds value but is not parameter semantics.

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 names a specific resource (the person's current TrailMark context) and enumerates exactly what that includes: open document, read/edit mode, on-screen section, selection, and dirty state. This is far more specific than the sibling list_* tools and immediately distinguishes it.

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

Usage Guidelines4/5

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

It gives explicit trigger conditions with quoted user phrasings ("this", "here", "the selected text", "this section") and states the prerequisite (TrailMark open with agent connection on). No alternative sibling is named as a fallback, so it stops short of a 5.

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