Skip to main content
Glama

SampLab Pro

Inspect MIDI File

inspect_midi
Read-onlyIdempotent

Parse a Standard MIDI file (.mid) from midi_base64 or a public HTTPS midi_url (up to 2 MB). Returns duration, BPM, time signature, estimated musical key, bar count, pitch range, and per-track instrument and note statistics.

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": "inspect_midi"
  }
}

Input Schema

NameRequiredDescriptionDefault
midi_urlNoPublic HTTPS URL pointing to a .mid file (up to 2 MB).
file_nameNoOptional original filename (e.g. melody.mid).
midi_base64NoBase64-encoded Standard MIDI (.mid) binary payload (optional data:audio/midi;base64,... prefix allowed).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish that the operation is read-only, idempotent, non-destructive, and open-world. The description adds meaningful context beyond that: accepted source formats, a 2 MB limit, and the specific returned fields. It does not cover failure behavior for invalid MIDI or inaccessible URLs.

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?

The description is two tightly structured sentences with no filler. It front-loads the operation and follows with the return values, which is appropriate because no output schema exists.

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 moderate-complexity inspection tool with full schema coverage and rich annotations, the description supplies the essential purpose, input sources, size constraint, and return fields. It leaves minor gaps around precedence when both source parameters are supplied and around error behavior.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents the three optional parameters. The description repeats midi_base64 and midi_url and the 2 MB limit but does not add meaning beyond the schema, and it omits the optional file_name parameter.

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 uses a specific verb and resource: 'Parse a Standard MIDI file (.mid)' and lists the metadata it returns. It is clear what the tool does, but it does not explicitly distinguish itself from sibling tools such as midi_to_musicxml.

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?

The description implies usage by stating the accepted MIDI sources and size limit, but it gives no explicit when-to-use guidance or comparison with alternative tools. An agent can infer it is for inspection, not conversion or analysis.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources