Skip to main content
Glama

peek

Returns an extractive summary of a file before reading it: first non-empty line and headings, capped near 300 tokens to preview structure and save context.

Instructions

Extractive summary of a file before reading it.

First non-empty line plus headings, capped at ~300 tokens.

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>"
    },
    "name": "peek"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
linesNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It usefully discloses the output shape ('first non-empty line plus headings') and a size cap ('~300 tokens'), but says nothing about permissions, failure behavior, or that it is non-mutating, leaving meaningful behavioral gaps.

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 terse lines, front-loaded with purpose, then output format. No filler and nothing 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 simple 2-param tool with an output schema, the purpose and output summary are adequate and return values need not be restated. However, the undocumented 'lines' parameter leaves a real completeness gap an agent must guess at.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate, yet neither parameter is mentioned. The 'lines' parameter in particular (integer, default 15) is never explained, and it is unclear how it interacts with the stated ~300-token cap.

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 names a specific verb and resource ('Extractive summary of a file') plus the intended moment of use ('before reading it'), which clearly separates it from the very different siblings (delta, find, map, places, status). It does not explicitly contrast with an alternative, so it stops short of 5.

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?

'before reading it' implies a usage context but gives no explicit when-not guidance or named alternative. The agent can infer it is a cheap preview step, but nothing states when a full read is preferable.

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