Skip to main content
Glama

infer_layout

Infers a control layout from a JSON sample, mapping data types to appropriate UI widgets like gauges, progress rings, toggles, maps, and lists.

Instructions

Infer a wired first-draft layout from a real JSON payload (paste a sample from your service, or use probe_service to capture one). Numbers→gauges, 0..1→progress rings, bools→toggles, lat/lng→map, arrays→sparklines/cardlists, strings→labels — each bound to the right nested valuePath.

Args: payload_json: A sample JSON object emitted by your service. name: Layout name. event: The mesh event the controls should listen on (default 'telemetry'). columns, rows: Grid of the inferred tab. into_buffer: Load the result into the working buffer for further editing (default).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoInferred
rowsNo
eventNotelemetry
columnsNo
into_bufferNo
payload_jsonYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations present, so description carries full burden. It explains the mapping logic (numbers->gauges, etc.) and default behavior (into_buffer). Could mention limitations but is fairly transparent.

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?

Efficiently structured with a lead sentence, mapping paragraph, and bullet list. No redundant text, though slightly long.

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?

Given the output schema exists and the tool is complex, the description adequately covers how to obtain input, the inference rules, and buffer behavior. Complete for its purpose.

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?

Despite 0% schema description coverage, the description provides comprehensive parameter explanations in the Args section, adding context for each parameter beyond schema defaults.

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 clearly states the verb 'infer' and resource 'first-draft layout from a real JSON payload'. It distinguishes from siblings by focusing on automatic inference from a payload sample.

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?

Provides clear context on when to use (when you have a JSON payload) and suggests using 'probe_service' to capture a sample. However, it lacks explicit exclusion statements for alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Mariner10/carter-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server