Skip to main content
Glama

Charts of a text

visualize
Read-onlyIdempotent

Draw charts of Spanish texts—Zipf, Heaps, spectrum, sentence lengths, dispersion, fingerprinting, rhythm—with a PNG image and numerical summary for clearer distribution analysis.

Instructions

Draw a chart of a text with the visualizers of esTS: a PNG image and a short summary in numbers.

Use it when a distribution is clearer shown than retold: the user sees the image, and the summary gives the numbers for conclusions. The charts chart:

  • zipf: Zipf's law - the frequencies of the words by rank on a logarithmic scale with the Zipf-Mandelbrot fit; the summary - the slope and the most frequent words.

  • heaps: Heaps' law - the growth of the number of unique words with the length of the text; the summary - the exponent of the law.

  • spectrum: frequency spectrum - how many unique words occur 1, 2, 3 and more times; the summary - the share of hapaxes.

  • sentence_lengths: the lengths of the sentences in order with the moving average and the distribution; the summary - the number, the mean, the smallest and the largest length and the window of the moving average (2% of the sentences, at least 10), if the line is drawn: a text shorter than 10 sentences has none.

  • dispersion: the places of the words words (lemmas) in the text; the summary - the frequency and Gries's DP of every word.

  • fingerprinting: literary fingerprinting - the TTR of the moving segments in color, showing the places where the vocabulary is poorer or richer; the summary - MATTR.

  • rhythm: the rhythm of a verse - the lines as rows of metrical syllables with the stressed ones; the summary - the number of lines and the meter, and for prose and a text without a meter a warning that the picture says nothing about the meter.

The labels of the charts are in English. The result is the image and the text of the summary; the last lines of the summary are warnings if the text is not in Spanish.

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": {
      "chart": "<chart>"
    },
    "name": "visualize"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoAbsolute path to a UTF-8 text file on the machine where the server runs, or a link ests://datasets/... from find_texts, instead of text: a long text need not be sent in the argument
textNoText in Spanish; path can be given instead
chartYesChart (see the description of the tool)
widthNoWidth of the image in pixels
wordsNoWords for chart=dispersion, up to 10
heightNoHeight of the image in pixels

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already establish readOnly/idempotent/closed-world, so the description's job is to add context, and it does: the return value is an image plus summary text, chart labels are in English, and trailing warnings appear when the text is not Spanish. It also discloses real edge cases, such as sentence_lengths omitting the moving-average line for texts under 10 sentences and rhythm warning that the picture says nothing about meter for prose.

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 purpose and usage condition before the enumeration, so an agent can stop reading early. The per-chart list is long but earns its place because the schema defers to it; minor cost comes from repetition and typos ('the words words', 'clearer shown than retold').

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?

With six parameters and no output schema, the description carries the burden of explaining results and does so (image plus summary, English labels, Spanish-text warnings). It is nearly complete; only the mapping of the 'words' argument to the dispersion chart is left to the schema.

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 schema's chart parameter literally says 'see the description of the tool' and delegates semantics to this text. The bullet list supplies that meaning for each enum value, including what each summary reports. The gap is that the 'words' parameter (for chart=dispersion, max 10) is never mentioned in the description.

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 opens with a specific verb and resource ('Draw a chart of a text with the visualizers of esTS') and immediately states the deliverable (PNG image plus numeric summary). The seven enumerated chart types make the scope concrete and tell an agent exactly what this tool produces versus analysis-only siblings like analyze_text or dispersion.

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?

It gives a clear selection rule: 'Use it when a distribution is clearer shown than retold: the user sees the image, and the summary gives the numbers for conclusions.' That is a genuine when-to-use criterion, but it does not explicitly exclude alternatives (e.g. textual analysis tools) or say when a chart is the wrong choice.

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