Skip to main content
Glama
mrseanchow

Cowsay MCP Server

by mrseanchow

list_cows

Display all available cow characters for ASCII art generation, including dragons, penguins, and skeletons to customize your text-based illustrations.

Instructions

List all available cow characters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that retrieves the list of available cow characters by running 'cowsay -l' or using the cowsay library API, with fallback list.
    export async function listCows(): Promise<string[]> {
        try {
            const { stdout } = await execAsync(`npx cowsay@1.6.0 -l`);
            return stdout.split('\n').filter(Boolean);
        } catch (error) {
            try {
                const cowsList = await new Promise<string[]>((resolve, reject) => {
                    cowsay.list((error, cow_names) => {
                        if (error) {
                            reject(error);
                        } else {
                            resolve(cow_names || []);
                        }
                    });
                });
                return cowsList;
            } catch (error) {
                return ['default', 'small', 'tux', 'moose', 'sheep', 'dragon', 'elephant', 'skeleton', 'stimpy'];
            }
        }
    }
  • Tool schema definition for 'list_cows', specifying no input parameters.
    export const LIST_COWS: Tool = {
      name: 'list_cows',
      title: 'List Cows',
      description: 'List all available cow characters.',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    };
  • src/index.ts:107-126 (registration)
    Registers the 'list_cows' tool on the MCP server, providing schema from LIST_COWS and a handler that validates access, calls listCows(), and formats the response as text content.
    mcp_server.registerTool("list_cows", {
        title: LIST_COWS.title,
        description: LIST_COWS.description,
        inputSchema: {},
    }, async () => {
        // Validate server access
        if (!validateServerAccess(config.serverToken)) {
            throw new Error("Server access validation failed. Please provide a valid serverToken.");
        }
        // Apply user preferences from config
        const result = await listCows();
        return {
            content: [
                {
                    type: "text",
                    text: `Available cow characters: ${result.join(', ')}`
                }
            ],
        };
    })
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 states the action ('List all available cow characters') but doesn't describe what 'available' means, how the list is formatted, if there are pagination or rate limits, or any side effects. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 a single, clear sentence that directly states the tool's purpose without any fluff or redundancy. It's front-loaded with the essential information, making it highly efficient and easy to parse, which is ideal for conciseness.

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 simplicity (0 parameters, no output schema, no annotations), the description is adequate as a basic listing function. However, it lacks details on output format, behavioral traits, or differentiation from siblings, which could be helpful for an AI agent. It meets the minimum viable standard but has clear gaps in context.

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 tool has 0 parameters, and the schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and it appropriately doesn't mention any. A baseline of 4 is applied as per the rules for tools with zero parameters, indicating it meets expectations without unnecessary detail.

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 verb ('List') and resource ('all available cow characters'), making the purpose immediately understandable. It doesn't differentiate from sibling tools like 'cowsay' or 'cowthink', which appear to be different operations rather than alternative listing methods, so a 4 is appropriate rather than a 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?

The description provides no guidance on when to use this tool versus its siblings ('cowsay' and 'cowthink'), which likely serve different purposes (e.g., generating cow-based messages). It also lacks context about prerequisites or limitations, offering only basic usage without comparative or exclusionary advice.

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/mrseanchow/cowsay-mcp'

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