Skip to main content
Glama
iijimam

RAGandLLM-MCP

by iijimam

register_choka

Register fishing catch records by specifying fish details including ID, name, size, and count for tracking and analysis.

Instructions

釣果登録が行えます

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
FishIDYesupload_fileの応答JSONにあるFishIDを使用する。upload_fileを事前に実行していいない場合はユーザによる指定が必要
FishNameYesupload_fileの応答JSONにあるFishNameを使用する。upload_fileを事前に実行していいない場合はユーザによる指定が必要
FishSizeYes釣果登録時、魚の体長をセンチメートルで指定する
FishCountYes釣果登録時、釣った魚の数を指定する。

Implementation Reference

  • The main handler function for the 'register_choka' tool. It constructs a JSON payload with fish_id, fish_name, fish_size, and fish_count, sends a POST request to the '/choka' API endpoint, and returns the JSON response.
    async def register_choka(fish_id: str, fish_name: str, fish_size: str,fish_count:int) -> str:
        headers={
            "Content-Type":"application/json;charset=utf-8"
        }
        # 送信するJSONボディを組み立て
        body = {
            "FishID": fish_id,
            "FishName": fish_name,
            "Size": fish_size,
            "FishCount": fish_count,
        }
        async with httpx.AsyncClient(timeout=80.0,verify=False) as client:
            response = await client.post(
                f"{API_BASE_URL}/choka",
                headers=headers,
                json=body
            )
            response.raise_for_status()
            data = response.json()
            return data
  • Registers the 'register_choka' tool in the MCP server's list_tools() handler, including name, description, and input schema.
    types.Tool(
        name="register_choka",
        description="釣果登録が行えます",
        inputSchema={
            "type": "object",
            "properties": {
                "FishID": {
                    "type": "string",
                    "description": "upload_fileの応答JSONにあるFishIDを使用する。upload_fileを事前に実行していいない場合はユーザによる指定が必要"
                },
                "FishName": {
                    "type": "string",
                    "description": "upload_fileの応答JSONにあるFishNameを使用する。upload_fileを事前に実行していいない場合はユーザによる指定が必要"
                },
                "FishSize": {
                    "type": "string",
                    "description": "釣果登録時、魚の体長をセンチメートルで指定する"
                },
                "FishCount": {
                    "type": "integer",
                    "description": "釣果登録時、釣った魚の数を指定する。"
                }
            },
            "required": ["FishID","FishName","FishSize","FishCount"]
        }
    )
  • Input JSON schema for the 'register_choka' tool, defining required string fields for FishID, FishName, FishSize and integer FishCount.
    inputSchema={
        "type": "object",
        "properties": {
            "FishID": {
                "type": "string",
                "description": "upload_fileの応答JSONにあるFishIDを使用する。upload_fileを事前に実行していいない場合はユーザによる指定が必要"
            },
            "FishName": {
                "type": "string",
                "description": "upload_fileの応答JSONにあるFishNameを使用する。upload_fileを事前に実行していいない場合はユーザによる指定が必要"
            },
            "FishSize": {
                "type": "string",
                "description": "釣果登録時、魚の体長をセンチメートルで指定する"
            },
            "FishCount": {
                "type": "integer",
                "description": "釣果登録時、釣った魚の数を指定する。"
            }
        },
        "required": ["FishID","FishName","FishSize","FishCount"]
    }
  • Dispatch handler in the main @server.call_tool() function that extracts arguments, calls the register_choka function, and returns the result as TextContent.
    elif name == "register_choka":
    
        if not isinstance(arguments, dict):
            raise ValueError("Invalid forecast arguments")
        
        fish_id=arguments["FishID"]
        fish_name=arguments["FishName"]
        fish_size=arguments["FishSize"]
        fish_count=arguments["FishCount"]
        try:
            answer= await register_choka(fish_id,fish_name,fish_size,fish_count)
            return [
                types.TextContent(
                    type="text",
                    text=json.dumps(answer,ensure_ascii=False, indent=2)
                    #text=f"🎉 IRIS接続成功!\n📥 応答::{msg}"
                )
            ]
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool can register fishing results, implying a write/mutation operation, but doesn't cover aspects like whether it requires authentication, what happens on success/failure, if it's idempotent, or any rate limits. This is a significant gap for a tool that likely modifies data.

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 a single, efficient sentence ('釣果登録が行えます'), which is appropriately concise. It front-loads the core action without unnecessary details. However, it could be slightly improved by integrating key usage hints from the schema, but it's not wasteful.

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 tool has no annotations, no output schema, and involves mutation (registering data), the description is incomplete. It doesn't explain what the tool returns, error conditions, or behavioral traits like side effects. For a 4-parameter write tool, this lack of context makes it inadequate for safe and effective use by an AI 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?

Schema description coverage is 100%, with all parameters well-documented in the input schema (e.g., FishID from upload_file, FishSize in centimeters). The description adds no additional meaning beyond the schema, so it meets the baseline of 3 where the schema handles parameter semantics adequately.

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 '釣果登録が行えます' translates to 'You can register fishing results,' which provides a basic verb+resource (register + fishing results). However, it's vague about what specifically is being registered (fish details from parameters) and doesn't distinguish from sibling tools like 'upload_file' or 'get_recipe.' It states the action but lacks specificity about scope or differentiation.

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 explicit guidance on when to use this tool versus alternatives is provided. The description doesn't mention prerequisites like needing to run 'upload_file' first, which is hinted at in the parameter descriptions but not in the tool description itself. There's no context on when-not-to-use or comparisons with siblings, leaving usage unclear.

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/iijimam/RAGandLLM-MCP'

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