Skip to main content
Glama
james-livefront

Poetry MCP Server

get_catalog_stats

Retrieve catalog statistics including poem counts, quality metrics, and health information to monitor your poetry collection's status and performance.

Instructions

Get catalog statistics.

Returns: CatalogStats with counts, metrics, and health information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
by_formYesCount of poems by form
by_stateYesCount of poems by state
last_syncNoTimestamp of last catalog sync
newest_poemYesTitle of most recently created poem
oldest_poemYesTitle of oldest poem
total_poemsYesTotal number of poems in catalog
avg_word_countYesAverage word count per poem
total_word_countYesTotal words across all poems
poems_without_tagsYesNumber of poems with no tags
poems_missing_frontmatterNoNumber of poems with incomplete frontmatter

Implementation Reference

  • The main execution logic for the get_catalog_stats tool. Decorated with @mcp.tool() which also handles registration in the FastMCP server. Calls catalog.get_stats() to compute and return CatalogStats.
    @mcp.tool()
    async def get_catalog_stats() -> CatalogStats:
        """
        Get catalog statistics.
    
        Returns:
            CatalogStats with counts, metrics, and health information
        """
        cat = get_catalog()
        return cat.get_stats()
  • Pydantic model defining the output schema (CatalogStats) for the get_catalog_stats tool, including detailed field descriptions and example.
    class CatalogStats(BaseModel):
        """
        Catalog statistics and health metrics.
    
        Returned by get_catalog_stats() tool.
        """
    
        total_poems: int = Field(
            ...,
            description="Total number of poems in catalog"
        )
    
        by_state: dict[str, int] = Field(
            ...,
            description="Count of poems by state"
        )
    
        by_form: dict[str, int] = Field(
            ...,
            description="Count of poems by form"
        )
    
        poems_without_tags: int = Field(
            ...,
            description="Number of poems with no tags"
        )
    
        poems_missing_frontmatter: int = Field(
            default=0,
            description="Number of poems with incomplete frontmatter"
        )
    
        total_word_count: int = Field(
            ...,
            description="Total words across all poems"
        )
    
        avg_word_count: float = Field(
            ...,
            description="Average word count per poem"
        )
    
        newest_poem: str = Field(
            ...,
            description="Title of most recently created poem"
        )
    
        oldest_poem: str = Field(
            ...,
            description="Title of oldest poem"
        )
    
        last_sync: Optional[str] = Field(
            default=None,
            description="Timestamp of last catalog sync"
        )
    
        class Config:
            """Pydantic configuration."""
            json_schema_extra = {
                "example": {
                    "total_poems": 381,
                    "by_state": {
                        "completed": 49,
                        "fledgeling": 172,
                        "still_cooking": 65,
                        "needs_research": 10,
                        "risk": 22,
                        "phone_poetry": 63
                    },
                    "by_form": {
                        "free_verse": 310,
                        "prose_poem": 45,
                        "american_sentence": 18,
                        "catalog_poem": 8
                    },
                    "poems_without_tags": 350,
                    "poems_missing_frontmatter": 0,
                    "total_word_count": 125430,
                    "avg_word_count": 329.2,
                    "newest_poem": "November Rain",
                    "oldest_poem": "First Poem",
                    "last_sync": "2025-10-30T21:45:00Z"
                }
            }
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. It mentions the return type 'CatalogStats with counts, metrics, and health information', which adds some behavioral context about output structure. However, it doesn't disclose critical traits like whether this is a read-only operation, performance implications, or error conditions, which are important 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 sized with two sentences: one stating the purpose and another detailing the return structure. It's front-loaded with the main action and avoids redundancy, though it could be slightly more structured for clarity.

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 has 0 parameters, an output schema exists (which covers return values), and no annotations, the description is minimally adequate. It states the purpose and return type, but for a tool in a context with many siblings, it lacks differentiation and behavioral details that would make it more complete for agent use.

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 with 100% schema description coverage, so the schema fully documents the lack of inputs. The description doesn't need to add parameter information, and it doesn't introduce any confusion. Baseline is 4 for zero parameters, as it appropriately avoids unnecessary details.

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 'Get catalog statistics' which is a clear verb+resource combination, but it's vague about what 'catalog statistics' specifically entails compared to siblings like 'get_server_info' or 'sync_catalog'. It doesn't distinguish itself from potential overlaps with other tools that might provide statistical or health information.

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?

No guidance is provided on when to use this tool versus alternatives. With siblings like 'get_server_info' and 'sync_catalog' that might offer related information, the description lacks any context about use cases, prerequisites, or exclusions, leaving the agent to infer usage.

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/james-livefront/poetry-mcp'

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