Skip to main content
Glama

pirate_summary

Summarize text in pirate style using LLM sampling to transform content into nautical-themed summaries.

Instructions

Summarise the given text in a pirate style. This is an example of a tool that can use LLM sampling to generate a summary.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The pirate_summary tool handler function. It takes input text and uses the context's LLM sampling (ctx.sample) to generate a concise pirate-style summary with high creativity (temperature=0.9).
    async def pirate_summary(self, ctx: Context, text: str) -> str | None:
        """Summarise the given text in a pirate style. This is an example of a tool that can use LLM sampling to generate a summary."""
        await ctx.info("Summarising text in pirate style using client LLM sampling.")
        response = await ctx.sample(
            messages=text,
            system_prompt="Your task is to summarise a given text in a pirate style. Use a fun and engaging tone but be concise.",
            temperature=0.9,  # High creativity
            max_tokens=1024,  # Pirates can be a bit verbose!
        )
        return getattr(response, "text", None)  # type: ignore
  • Registration of tools in PyMCP class, including the pirate_summary tool with tags indicating it's an example using LLM sampling.
    tools = [
        {
            "fn": "greet",
            "tags": ["greeting", "example"],
            "annotations": {"readOnlyHint": True},
        },
        {
            "fn": "generate_password",
            "tags": ["password-generation", "example"],
            "annotations": {"readOnlyHint": True},
        },
        {
            "fn": "text_web_search",
            "tags": ["meta-search", "text-search", "searchexample"],
        },
        {
            "fn": "permutations",
            "tags": ["math", "permutation", "example"],
            "annotations": {"readOnlyHint": True},
        },
        {"fn": "pirate_summary", "tags": ["pirate-summary", "llm-sampling", "example"]},
        {"fn": "vonmises_random", "tags": ["experimental", "elicitation", "example"]},
    ]
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions LLM sampling, which hints at generative AI behavior, but doesn't disclose important traits like whether this is a read-only operation, potential rate limits, output format, or error conditions. The description is insufficient for a tool with no annotation coverage.

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?

The description is appropriately concise with two sentences. The first sentence clearly states the purpose, while the second provides implementation context. However, the second sentence about 'example tool' and 'LLM sampling' could be considered extraneous information that doesn't help the agent select or invoke the tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (text summarization with style transformation), no annotations, and the presence of an output schema, the description is minimally adequate. The output schema existence means the description doesn't need to explain return values, but it lacks important behavioral context for a generative tool with no annotation coverage.

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?

The description adds meaningful context about the 'text' parameter beyond what the schema provides. While the schema only indicates it's a required string, the description clarifies this is 'given text' to be summarized in pirate style. With 0% schema description coverage and only one parameter, this provides adequate semantic understanding despite the simple schema.

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 clearly states the tool's purpose: 'Summarise the given text in a pirate style.' It specifies both the verb ('Summarise') and the resource ('given text'), and adds the distinctive style constraint ('pirate style'). However, it doesn't explicitly differentiate from sibling tools, which include other text processing tools like permutations and text_web_search.

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?

The description provides no guidance on when to use this tool versus alternatives. It mentions 'This is an example of a tool that can use LLM sampling to generate a summary,' which is a technical implementation detail rather than usage guidance. There's no indication of when to choose this over other text processing siblings like permutations or text_web_search.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/anirbanbasu/pymcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server