Skip to main content
Glama
Ukenn2112

Bangumi TV MCP Service

by Ukenn2112

get_character_details

Retrieve detailed information about a specific character using their unique ID for anime, manga, music, or game-related queries on Bangumi TV.

Instructions

Get details of a specific character.

Args:
    character_id: The ID of the character.

Returns:
    Formatted character details or an error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
character_idYes

Implementation Reference

  • The handler function for the 'get_character_details' tool. Decorated with @mcp.tool() for registration in FastMCP. Fetches character data from Bangumi API endpoint /v0/characters/{character_id}, handles errors, and formats details including name, type, summary, gender, blood type, birth date, infobox note, stats, and image.
    @mcp.tool()
    async def get_character_details(character_id: int) -> str:
        """
        Get details of a specific character.
    
        Args:
            character_id: The ID of the character.
    
        Returns:
            Formatted character details or an error message.
        """
        response = await make_bangumi_request(
            method="GET", path=f"/v0/characters/{character_id}"
        )
    
        error_msg = handle_api_error_response(response)
        if error_msg:
            return error_msg
    
        # Expecting a dictionary
        if not isinstance(response, dict):
            return f"Unexpected API response format for get_character_details: {response}"
    
        character = response
        infobox = character.get("infobox")
    
        details_text = f"Character Details (ID: {character_id}):\n"
        details_text += f"  Name: {character.get('name')}\n"
        char_type_int = character.get("type")
        char_type_str = "Unknown Type"
        if char_type_int is not None:
            try:
                char_type_str = CharacterType(char_type_int).name
            except ValueError:
                char_type_str = f"Unknown Type ({char_type_int})"
    
        details_text += f"  Type: {char_type_str}\n"
        details_text += f"  Summary:\n{character.get('summary')}\n"
        details_text += f"  Locked: {character.get('locked')}\n"
    
        if character.get("gender"):
            details_text += f"  Gender: {character.get('gender')}\n"
        if character.get("blood_type") is not None:
            try:
                details_text += (
                    f"  Blood Type: {BloodType(character.get('blood_type')).name}\n"
                )
            except ValueError:
                details_text += f"  Blood Type: Unknown ({character.get('blood_type')})\n"
    
        if character.get("birth_year"):
            details_text += f"  Birth Date: {character.get('birth_year')}-{character.get('birth_mon')}-{character.get('birth_day')}\n"
    
        if infobox:
            details_text += (
                "  Infobox: (Details available in raw response, potentially complex)\n"
            )
    
        stat = character.get("stat", {})
        details_text += f"  Comments: {stat.get('comments', 0)}, Collections: {stat.get('collects', 0)}\n"
    
        images = character.get("images")
        if images and images.get("large"):
            details_text += f"  Image: {images.get('large')}\n"
    
        return details_text
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 that the tool returns 'formatted character details or an error message', which hints at output behavior, but lacks critical details like whether it's a read-only operation, authentication requirements, rate limits, or error handling specifics. For a tool with no annotation coverage, this is insufficient.

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 highly concise and well-structured, using a brief purpose statement followed by labeled 'Args' and 'Returns' sections. Every sentence earns its place by providing essential information without redundancy, making it easy to parse and front-loaded for quick understanding.

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 low complexity (one parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose and parameter semantics but lacks behavioral context and usage guidelines. Without annotations or output schema, more detail on return values or operational constraints would improve completeness for agent selection.

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 description explicitly defines the single parameter 'character_id' as 'The ID of the character', adding clear semantic meaning beyond the schema's basic type (integer). With 0% schema description coverage and only one parameter, this adequately compensates, though it doesn't specify format constraints (e.g., valid ID ranges).

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 tool's purpose with a specific verb ('Get') and resource ('details of a specific character'), making it immediately understandable. However, it doesn't differentiate from sibling tools like 'search_characters' or 'get_character_subjects', which would require explicit comparison to earn a perfect score.

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. With multiple sibling tools available (e.g., 'search_characters' for broader queries, 'get_character_subjects' for related data), there's no indication of prerequisites, constraints, or comparative use cases, leaving the agent to infer usage context.

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

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/Ukenn2112/BangumiMCP'

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