Skip to main content
Glama
Ukenn2112

Bangumi TV MCP Service

by Ukenn2112

get_person_details

Retrieve detailed information about a specific person or company by providing their unique ID using this tool on the Bangumi TV MCP Service.

Instructions

Get details of a specific person or company.

Args:
    person_id: The ID of the person/company.

Returns:
    Formatted person details or an error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
person_idYes

Implementation Reference

  • The core handler function for the 'get_person_details' tool, decorated with @mcp.tool(). It retrieves person details from the Bangumi API using make_bangumi_request, handles errors, parses the response, and formats a detailed string output including name, type, summary, careers, gender, birth date, stats, and image.
    @mcp.tool()
    async def get_person_details(person_id: int) -> str:
        """
        Get details of a specific person or company.
    
        Args:
            person_id: The ID of the person/company.
    
        Returns:
            Formatted person details or an error message.
        """
        response = await make_bangumi_request(method="GET", path=f"/v0/persons/{person_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_person_details: {response}"
    
        person = response
        infobox = person.get("infobox")
    
        details_text = f"Person Details (ID: {person_id}):\n"
        details_text += f"  Name: {person.get('name')}\n"
        person_type_int = person.get("type")
        person_type_str = "Unknown Type"
        if person_type_int is not None:
            try:
                person_type_str = PersonType(person_type_int).name
            except ValueError:
                person_type_str = f"Unknown Type ({person_type_int})"
    
        details_text += f"  Type: {person_type_str}\n"
        details_text += f"  Summary:\n{person.get('summary')}\n"
        details_text += f"  Locked: {person.get('locked')}\n"
        details_text += f"  Careers: {', '.join(person.get('career') or [])}\n"
    
        if person.get("gender"):
            details_text += f"  Gender: {person.get('gender')}\n"
        if person.get("blood_type") is not None:
            try:
                details_text += (
                    f"  Blood Type: {BloodType(person.get('blood_type')).name}\n"
                )
            except ValueError:
                details_text += f"  Blood Type: Unknown ({person.get('blood_type')})\n"
    
        if person.get("birth_year"):
            details_text += f"  Birth Date: {person.get('birth_year')}-{person.get('birth_mon')}-{person.get('birth_day')}\n"
    
        if infobox:
            details_text += (
                "  Infobox: (Details available in raw response, potentially complex)\n"
            )
    
        stat = person.get("stat", {})
        details_text += f"  Comments: {stat.get('comments', 0)}, Collections: {stat.get('collects', 0)}\n"
    
        images = person.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 states the tool retrieves details, implying a read-only operation, but doesn't cover critical aspects like authentication needs, rate limits, error conditions beyond 'error message', or what 'formatted person details' entails (e.g., structure, fields). This is inadequate for a tool with no annotation support.

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 concise and well-structured: a clear purpose statement followed by Args and Returns sections. Every sentence adds value (e.g., specifying the parameter and return). It could be slightly more front-loaded by integrating the parameter hint into the main sentence, but it's efficient overall.

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 (a retrieval tool with no annotations, no output schema, and 0% schema coverage), the description is incomplete. It doesn't explain what 'formatted person details' includes, potential side effects, or how errors are handled. For a tool that likely returns structured data, this leaves significant gaps for the agent.

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

Parameters3/5

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

The description adds minimal semantics: it explains that 'person_id' is 'The ID of the person/company,' clarifying it can refer to either entity. With 0% schema description coverage (schema has no descriptions), this provides some value, but it doesn't detail ID format, sourcing, or constraints. The baseline is 3 since the schema lacks descriptions, and the description compensates slightly but not fully.

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: 'Get details of a specific person or company.' It uses a specific verb ('Get') and resource ('person or company'), making the intent unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'search_persons' or 'get_person_characters', which likely serve different purposes (searching vs. retrieving specific details).

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 (e.g., needing a person_id), exclusions, or comparisons to siblings like 'search_persons' (for finding people) or 'get_person_characters' (for related data). This leaves the agent to infer usage from context 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

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