Skip to main content
Glama

Detect format

detect_format
Read-only

Identify unknown or unlabelled input formats (JSON, YAML, TOML, XML, CSV, base64, JWT, UUID, and more) with confidence-ranked candidates so you can choose the correct utility.

Instructions

Guess what input is — JSON, YAML, TOML, XML, HTML, CSV/TSV, base64/base32/hex, URL-encoding, JWT, UUID, data URI, gzip/zlib, email, URL, IP address, unix timestamp, Markdown, SQL, Morse code, ROT13, plain binary — and return {candidates: [{format, confidence, note}]}, best first, confidence 0-1. Use it when you are handed an opaque or unlabelled value and must pick a utility for it; skip it when the format is already known. It only identifies, never transforms: to decode, search list_utilities for the top format (base64 -> base64_decode, JWT -> jwt_decode) and run that with run_utility. Ambiguous input yields several candidates (all-digit text can be a timestamp, JSON and hex at once); treat anything below about 0.45 as a weak guess. Use inputEncoding "base64"/"hex" only to deliver binary data such as gzip bytes: it is decoded before detection, so a base64 string you want identified must stay "text" (the default). Empty input yields an empty list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesThe value to inspect.
inputEncodingNoHow to decode `input` first. Default "text".

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
candidatesYesLikely formats, best first; confidence is 0-1. Empty for empty input.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.8.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint, openWorldHint=false), yet the description still adds real behavior: it identifies but never transforms, ambiguous input returns multiple candidates, low-confidence results are weak guesses, and empty input yields an empty list. That is genuine operational context, though it doesn't discuss cost, size limits, or performance on large inputs.

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 return shape are front-loaded, and the trailing clauses all carry actionable content (threshold, encoding caveat, empty-input case). The long mid-sentence format enumeration is heavier than necessary, but it does set expectation for candidate breadth.

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?

Output schema exists so return values needn't be explained, and the description still previews the candidates/best-first shape. With only two parameters, both annotated in the schema and clarified in prose, nothing an agent needs to invoke this correctly is missing.

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?

Schema coverage is 100%, so the baseline is 3, but the description earns extra by clarifying the counterintuitive `inputEncoding` semantics: base64/hex are for delivering binary bytes, not for identifying a base64-looking string, which must stay "text". This is meaning the schema's one-line description does not convey.

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 (detect/guess) and resource (an opaque `input` value), enumerates the concrete format families it recognizes, and names the sibling tools (list_utilities, run_utility) it hands off to. An agent can distinguish it from all four siblings without opening a schema.

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?

Explicit routing: 'Use it when you are handed an opaque or unlabelled value... skip it when the format is already known,' plus the follow-on workflow (search list_utilities for the top format, then run_utility). Also supplies the confidence threshold (~0.45) that decides whether a candidate is actionable.

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