Skip to main content
Glama

mort_format

Formats Mort source code using the official mortc fmt formatter and returns the formatted text, helping agents normalize code before review or execution.

Instructions

Format Mort source with the official formatter (mortc fmt) and return the formatted text.

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": {
      "source": "<source>"
    },
    "name": "mort_format"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose the important behavioral point that formatting is done by the official `mortc fmt` tool and that the result is returned as text (no file mutation implied), but it says nothing about behavior on syntactically invalid input, error signaling, or idempotency.

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 short sentences, front-loaded with the action and the implementation, with zero filler wording.

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?

An output schema exists, so return values need not be explained. For a single-input pure formatter, the description is nearly complete; the only meaningful gap is failure behavior on malformed source.

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 coverage is 0% and the single parameter is only titled 'Source'. The description partially compensates by indicating the input is source text that gets formatted and returned, which implies a code string rather than a file path, but it never states the format or that it must be the full source contents.

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?

States a specific verb (format) and resource (Mort source) and even names the underlying implementation (`mortc fmt`), plus what is returned. It does not explicitly differentiate from the sibling mort_check, which is presumably the read-only validator, so it falls just 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 Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use or when-not-to-use guidance, no mention of how it relates to mort_check or mort_run, and no stated prerequisites (e.g. whether the source must parse before formatting). Usage is only weakly implied by the tool name.

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