Skip to main content
Glama
stijn-meijers

DraCor MCP Server

compare_plays

Analyze and contrast two dramatic plays by comparing their structural metrics and textual features to identify similarities and differences.

Instructions

Compare two plays in terms of metrics and structure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
corpus_name1Yes
play_name1Yes
corpus_name2Yes
play_name2Yes

Implementation Reference

  • The complete implementation of the 'compare_plays' tool, including registration via the @mcp.tool() decorator and the handler function that fetches play metadata and metrics for two specified plays from the DraCor API and compiles them into a comparison structure. The input schema is defined by the function parameters.
    @mcp.tool()
    def compare_plays(
        corpus_name1: str, 
        play_name1: str, 
        corpus_name2: str, 
        play_name2: str
    ) -> Dict:
        """Compare two plays in terms of metrics and structure."""
        try:
            play1 = api_request(f"corpora/{corpus_name1}/plays/{play_name1}")
            play2 = api_request(f"corpora/{corpus_name2}/plays/{play_name2}")
            
            metrics1 = api_request(f"corpora/{corpus_name1}/plays/{play_name1}/metrics")
            metrics2 = api_request(f"corpora/{corpus_name2}/plays/{play_name2}/metrics")
            
            # Compile comparison data
            comparison = {
                "plays": [
                    {
                        "title": play1.get("title"),
                        "author": play1.get("authors", [{}])[0].get("name") if play1.get("authors") else None,
                        "year": play1.get("yearNormalized"),
                        "metrics": metrics1
                    },
                    {
                        "title": play2.get("title"),
                        "author": play2.get("authors", [{}])[0].get("name") if play2.get("authors") else None,
                        "year": play2.get("yearNormalized"),
                        "metrics": metrics2
                    }
                ]
            }
            
            return comparison
        except Exception as e:
            return {"error": str(e)}
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 comparing metrics and structure but doesn't specify what the tool returns (e.g., a report, scores, or visual output), whether it's read-only or has side effects, or any limitations like performance or data availability. This leaves significant gaps in understanding the tool's behavior.

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 a single sentence that is front-loaded and efficient, with no wasted words. It directly states the tool's function without unnecessary elaboration. However, it could be more structured by including key details, but it earns high marks for brevity and clarity within its limited scope.

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

Completeness2/5

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

Given the complexity of comparing two plays with 4 parameters, no annotations, no output schema, and 0% schema coverage, the description is incomplete. It lacks details on what metrics and structure are compared, the output format, and any behavioral traits. For a tool with multiple inputs and no structured support, this description is inadequate to guide effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 4 parameters with 0% description coverage, and the tool description adds no parameter semantics. It doesn't explain what 'corpus_name' or 'play_name' refer to, their expected formats, or how they relate to the comparison. With low schema coverage, the description fails to compensate, leaving parameters largely undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool compares two plays in terms of metrics and structure, which is a clear purpose but vague. It specifies the verb 'compare' and resource 'plays', but lacks details on what specific metrics or structural aspects are compared, making it less specific. It doesn't differentiate from siblings like 'analyze_play_structure' or 'search_plays', which could involve similar analyses.

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 doesn't mention when to choose this over sibling tools such as 'analyze_play_structure' for single-play analysis or 'find_character_across_plays' for character-focused comparisons. There are no explicit when/when-not instructions or prerequisites, leaving usage unclear.

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/stijn-meijers/dracor-mcp'

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