Skip to main content
Glama

compare_plays

Analyze and compare two dramatic plays by metrics and structural elements using the DraCor MCP Server. Identify differences in texts, character networks, and play information for research or study.

Instructions

Compare two plays in terms of metrics and structure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
corpus_name1Yes
corpus_name2Yes
play_name1Yes
play_name2Yes

Implementation Reference

  • The compare_plays tool implementation, decorated with @mcp.tool() which registers it as an MCP tool. Fetches play metadata and metrics for two plays and returns a comparison dictionary.
    @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)}

Other Tools

Related 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