Skip to main content
Glama
stijn-meijers

DraCor MCP Server

find_character_across_plays

Locate a specific character's appearances across multiple dramatic plays in the DraCor database to analyze their roles and relationships in different works.

Instructions

Find a character across multiple plays in the DraCor database.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
character_nameYes

Implementation Reference

  • The handler function decorated with @mcp.tool() that implements the logic to find occurrences of a character across all plays in all corpora by querying the DraCor API for corpora, plays, and characters, matching by name (case-insensitive), and collecting relevant metadata.
    @mcp.tool()
    def find_character_across_plays(character_name: str) -> Dict:
        """Find a character across multiple plays in the DraCor database."""
        try:
            all_corpora = api_request("corpora")
            matches = []
            
            for corpus in all_corpora:
                corpus_name = corpus["name"]
                corpus_data = api_request(f"corpora/{corpus_name}")
                
                for play in corpus_data.get("plays", []):
                    play_name = play.get("name")
                    
                    try:
                        characters = api_request(f"corpora/{corpus_name}/plays/{play_name}/characters")
                        
                        for character in characters:
                            if character_name.lower() in (character.get("name") or "").lower():
                                matches.append({
                                    "corpus": corpus_name,
                                    "play": play.get("title"),
                                    "character": character.get("name"),
                                    "gender": character.get("gender"),
                                    "numOfSpeechActs": character.get("numOfSpeechActs"),
                                    "numOfWords": character.get("numOfWords")
                                })
                    except:
                        continue
            
            return {"matches": matches}
        except Exception as e:
            return {"error": str(e)}
  • The @mcp.tool() decorator registers the find_character_across_plays function as an MCP tool.
    @mcp.tool()
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 tool 'finds' a character, implying a read-only search operation, but doesn't specify behavioral traits like whether it returns all occurrences, pagination, error handling, or performance characteristics. For a tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves beyond the basic action.

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, efficient sentence that directly states the tool's function without unnecessary words. It's front-loaded with the core action and resource, making it easy to parse quickly. There's no wasted text, and it appropriately sized for the tool's apparent simplicity.

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 tool has no annotations, no output schema, and low parameter schema coverage, the description is incomplete. It doesn't explain what the tool returns (e.g., a list of plays, character details, or links), how results are formatted, or any limitations. For a search tool with minimal structured data, the description should provide more context to be fully helpful to an agent.

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 1 parameter with 0% description coverage, so the schema provides no semantic details. The description doesn't add any meaning beyond the schema; it doesn't explain what 'character_name' should include (e.g., full name, partial matches, case sensitivity) or provide examples. With low schema coverage, the description fails to compensate, leaving the parameter poorly documented.

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's purpose as finding a character across multiple plays in the DraCor database, which is clear but vague. It specifies the verb 'find' and resource 'character across multiple plays', but doesn't distinguish it from sibling tools like 'analyze_character_relations' or 'search_plays' that might also involve character-related operations. The purpose is understandable but lacks specificity about what 'find' entails compared to alternatives.

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 prerequisites, exclusions, or compare it to sibling tools such as 'analyze_character_relations' (which might analyze character networks) or 'search_plays' (which might search for broader content). Without any context on usage scenarios, the agent must infer when this tool is appropriate based on the name alone.

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