execute_api_endpoint
Execute API endpoints for Yaizu City's open data and smart city services by specifying URL, HTTP method, and parameters. Returns API responses to access municipal data and services.
Instructions
【非推奨】汎用エンドポイント実行ツール(互換性のために保持) 新しいコードでは execute_yaizu_api() を使用してください。
Args: endpoint_url: APIエンドポイントのURL method: HTTPメソッド(GET, POST, PUT, DELETE) params: クエリパラメータまたはJSONボディ(JSON文字列形式)
Returns: str: APIレスポンス
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endpoint_url | Yes | ||
| method | No | GET | |
| params | No |
Implementation Reference
- mcp/server.py:256-270 (handler)The core handler function for the 'execute_api_endpoint' MCP tool. Registered via @mcp.tool() decorator. Includes input schema in type annotations and docstring. Currently deprecated, serving as a compatibility stub that recommends using 'execute_yaizu_api' instead.@mcp.tool() async def execute_api_endpoint(endpoint_url: str, method: str = "GET", params: Optional[str] = None) -> str: """ 【非推奨】汎用エンドポイント実行ツール(互換性のために保持) 新しいコードでは execute_yaizu_api() を使用してください。 Args: endpoint_url: APIエンドポイントのURL method: HTTPメソッド(GET, POST, PUT, DELETE) params: クエリパラメータまたはJSONボディ(JSON文字列形式) Returns: str: APIレスポンス """ return "⚠️ この機能は非推奨です。\n\n焼津市APIを使用する場合は、`execute_yaizu_api()` 関数を使用してください。\n\n例:\n```\nexecute_yaizu_api(\"Aed\", limit=10)\n```\n\nコマンド生成には `generate_api_command()` を使用してください。"
- mcp/server.py:256-256 (registration)The @mcp.tool() decorator registers the execute_api_endpoint function as an MCP tool.@mcp.tool()
- mcp/server.py:258-268 (schema)Docstring defining the input schema (parameters) and output type for the tool.""" 【非推奨】汎用エンドポイント実行ツール(互換性のために保持) 新しいコードでは execute_yaizu_api() を使用してください。 Args: endpoint_url: APIエンドポイントのURL method: HTTPメソッド(GET, POST, PUT, DELETE) params: クエリパラメータまたはJSONボディ(JSON文字列形式) Returns: str: APIレスポンス
- mcp/server.py:605-645 (helper)In get_sample_endpoints tool, provides documentation and usage example for execute_api_endpoint.return """# 焼津市スマートシティAPI エンドポイント例 ## 防災関連API - `https://api.smartcity-yaizu.jp/v1/disaster/shelters` - 避難所情報 - `https://api.smartcity-yaizu.jp/v1/disaster/alerts` - 災害警報情報 - `https://api.smartcity-yaizu.jp/v1/disaster/hazardmap` - ハザードマップ情報 ## 公共施設API - `https://api.smartcity-yaizu.jp/v1/facilities/public` - 公共施設一覧 - `https://api.smartcity-yaizu.jp/v1/facilities/parks` - 公園情報 - `https://api.smartcity-yaizu.jp/v1/facilities/libraries` - 図書館情報 ## 交通・インフラAPI - `https://api.smartcity-yaizu.jp/v1/transport/buses` - バス路線情報 - `https://api.smartcity-yaizu.jp/v1/transport/parking` - 駐車場情報 - `https://api.smartcity-yaizu.jp/v1/infrastructure/roads` - 道路状況 ## 観光・イベントAPI - `https://api.smartcity-yaizu.jp/v1/tourism/spots` - 観光スポット - `https://api.smartcity-yaizu.jp/v1/events/calendar` - イベントカレンダー - `https://api.smartcity-yaizu.jp/v1/tourism/restaurants` - 飲食店情報 ## 環境・センサーAPI - `https://api.smartcity-yaizu.jp/v1/environment/weather` - 気象情報 - `https://api.smartcity-yaizu.jp/v1/environment/air-quality` - 大気質情報 - `https://api.smartcity-yaizu.jp/v1/sensors/water-level` - 水位センサー情報 ## 使用方法 `execute_api_endpoint`ツールを使用してこれらのエンドポイントにアクセスできます。 例: ``` execute_api_endpoint( endpoint_url="https://api.smartcity-yaizu.jp/v1/disaster/shelters", method="GET", params='{"limit": 10}' ) ``` 注: 実際のエンドポイントURLはAPIカタログで確認してください。 """