Skip to main content
Glama
Infinite Code Next

Infinite Code Next

by Kawai-Senpai

preview

Renders local files or inline text as native MCP images for AI agents, converting documents, PDFs, office files, and video frames into viewable pages for inspection.

Instructions

Preview a local file or inline text as native MCP images.

Args: path: Absolute local path or path relative to root. Supply path or text. text: Inline text to render. Use a path for large text already on disk. kind: auto, image, document (PDF, SVG, XPS, ebook), office, text, or video. page: First page or animated image frame, starting at 1. count: Consecutive pages or frames (1-4, default 1). For video, sample 1-12 frames (default 6) into one annotated filmstrip. max_side: Maximum image dimension in pixels, 640-2048. Keep this the same when using next_page to resume a text preview. start_seconds: Video interval start, default 0. end_seconds: Video interval end, default video duration. root: Base directory for relative paths, default ICN workspace root.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "preview"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNoauto
pageNo
pathNo
rootNo
textNo
countNo
max_sideNo
end_secondsNo
start_secondsNo

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?

With no annotations, the description carries the full burden and mostly succeeds: it discloses auto-detection via kind, page/frame numbering starting at 1, count limits (1-4 pages/frames), video filmstrip sampling (1-12 frames, default 6) merged into one annotated image, max_side bounds of 640-2048, and start/end second defaults. Remaining gaps: no statement of read-only semantics or permissions, no mention of failure modes for a missing/unsupported file, and no warning that large pages or filmstrips consume significant context as images.

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?

Front-loaded with a one-sentence purpose, then a well-ordered Args block where each line is terse and earns its place. Slight inefficiency: 'Supply path or text' restates what the two entries already make obvious, and a couple of notes (max_side continuation, video defaults) are buried mid-list rather than surfaced up front.

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 nine-parameter, no-annotation, no-output-schema tool this is close to sufficient: it covers source selection, format modes, paging, frame sampling, resolution, time ranges, and the return medium is named in the opening line. What's missing is operational context an agent would want before calling it — error behavior for unreadable or out-of-root paths, and any sense of output volume/cost when rendering many pages or frames.

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

Parameters5/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 document all nine parameters and it does: path vs text, root defaulting to the ICN workspace root and acting as the base for relative paths, kind's six accepted values despite the schema carrying no enum, page origin at 1, count range and defaults including the different video default, max_side bounds, and video interval start/end semantics. This is exactly the compensation the low coverage requires.

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?

States a specific verb (preview), a specific resource (a local file or inline text), and the output medium (native MCP images) in the first line. None of the sibling tools (workspace, graph, paper, record, etc.) overlap, so an agent can tell this is the rendering/preview tool without opening the schema. The Args block then enumerates every supported source type, reinforcing scope.

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?

Gives concrete selection guidance for the main choice: 'Supply path or text' and 'Use a path for large text already on disk.' It also prescribes behavior for resuming ('keep max_side the same when using next_page'), which effectively explains continuation workflow. It stops short of stating when to use preview at all versus other ways of reading content, and never says what happens if both path and text are supplied.

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