Skip to main content
Glama

UK Data: Code utilities

find_longest_word

Read-onlyIdempotent

Finds and returns the longest word in a given text string. If multiple words have the same maximum length, returns the first occurrence. (cost: 1 credit)

Input Schema

NameRequiredDescriptionDefault
textNostring, required, the text to search for the longest word

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already mark this as read-only, idempotent, non-destructive, and open-world. The description adds two pieces of behavior beyond annotations: tie-breaking returns the first occurrence, and each call costs 1 credit. It does not define word boundaries, punctuation handling, empty-string behavior, or case sensitivity, which are relevant gaps for a string-processing tool.

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 sentences, front-loaded with the core behavior and followed by the tie-break and cost. There is no unnecessary 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?

For a one-parameter utility with no output schema and rich safety annotations, the description covers the return value, tie-break rule, and cost. It remains slightly incomplete about tokenization and edge cases, but is adequate for correct typical invocation.

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 100%, so the single text parameter is already documented in the schema. The description refers only to 'a given text string' and adds no format, encoding, or tokenization semantics beyond the schema.

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 states a specific verb ('Finds and returns') and resource ('the longest word in a given text string'), and it adds tie-breaking behavior. This is enough for an agent to distinguish it from sibling string utilities such as reverse_string or text_stats.

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?

It provides no explicit when-to-use guidance, no alternatives, and no exclusions; the usage is only implied by the purpose. An agent can infer it is for extracting the longest word, but the description does not route it against related string tools.

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