Skip to main content
Glama
iijimam
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}" ) ]
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