Skip to main content
Glama
Ukenn2112

Bangumi TV MCP Service

by Ukenn2112

get_person_characters

Retrieve a list of characters voiced or portrayed by a specific person using their ID. Ideal for identifying roles of voice actors or actors in the BangumiTV database.

Instructions

List characters voiced or portrayed by a person (e.g., voice actor, actor).

Args:
    person_id: The ID of the person.

Returns:
    Formatted list of related characters or an error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
person_idYes

Implementation Reference

  • main.py:1292-1292 (registration)
    The @mcp.tool() decorator registers the function below as an MCP tool named 'get_person_characters' based on the function name.
    @mcp.tool()
  • The main handler function that fetches characters related to a person by making an API request to Bangumi's /v0/persons/{person_id}/characters endpoint, processes the response, formats the output listing character IDs, names, types, and roles.
    async def get_person_characters(person_id: int) -> str:
        """
        List characters voiced or portrayed by a person (e.g., voice actor, actor).
    
        Args:
            person_id: The ID of the person.
    
        Returns:
            Formatted list of related characters or an error message.
        """
        response = await make_bangumi_request(
            method="GET", path=f"/v0/persons/{person_id}/characters"
        )
    
        error_msg = handle_api_error_response(response)
        if error_msg:
            return error_msg
    
        # Expecting a list of characters
        if not isinstance(response, list):
            return f"Unexpected API response format for get_person_characters: {response}"
    
        characters = response
        if not characters:
            return f"No characters found related to person ID {person_id}."
    
        formatted_results = []
        for character in characters:
            name = character.get("name")
            char_id = character.get("id")
            char_type_int = character.get("type")
            try:
                char_type_str = (
                    CharacterType(char_type_int).name
                    if char_type_int is not None
                    else "Unknown Type"
                )
            except ValueError:
                char_type_str = f"Unknown Type ({char_type_int})"
    
            staff_info = character.get(
                "staff"
            )  # Role of the person for this character (e.g., Voice Actor name)
    
            formatted_results.append(
                f"Character ID: {char_id}, Name: {name}, Type: {char_type_str}, Role: {staff_info}"
            )
    
        return "Characters Related to This Person:\n" + "\n---\n".join(formatted_results)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While it mentions the tool returns 'Formatted list of related characters or an error message', it doesn't describe pagination behavior, rate limits, authentication requirements, or what constitutes a valid person_id. For a read operation with zero annotation coverage, this leaves significant behavioral gaps.

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 perfectly structured and concise: a clear purpose statement followed by separate Args and Returns sections. Every sentence earns its place, with no redundant information. The three-part structure (purpose, parameters, returns) is front-loaded and efficient.

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?

For a single-parameter read tool with no output schema, the description provides adequate basic information about purpose and parameters. However, it lacks details about the return format (beyond 'formatted list'), error conditions, or how to obtain valid person_ids. Given the absence of annotations and output schema, more behavioral context would be beneficial.

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?

With 0% schema description coverage and only one parameter, the description adds meaningful context by explaining that person_id refers to 'The ID of the person' and clarifying this is for 'voice actor, actor' contexts. This compensates well for the schema's lack of descriptions, though it doesn't specify format constraints or valid ranges for the integer ID.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/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 specific verb ('List') and resource ('characters voiced or portrayed by a person'), and distinguishes it from siblings like get_person_details (which returns person info) or get_character_details (which returns character info). The parenthetical '(e.g., voice actor, actor)' provides helpful context about the type of person.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when you need character information for a specific person, but doesn't explicitly state when to use this tool versus alternatives like get_person_subjects (which returns subjects related to a person) or search_characters (which searches characters by criteria). No explicit when-not-to-use guidance or prerequisite information is provided.

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