获取 MCP 工具规格
如需获取 MCP 服务器中所有工具的 MCP 工具规范,请使用 tools/list 方法。以下示例演示了如何使用 curl 列出 MCP 服务器中当前可用的所有工具及其规范。
| Curl 请求 |
|---|
curl --location 'https://bigquery.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/list", "jsonrpc": "2.0", "id": 1 }' |
| MCP 工具 | |
|---|---|
| list_dataset_ids | 列出 Google Cloud 项目中的 BigQuery 数据集 ID。 |
| get_dataset_info | 获取有关 BigQuery 数据集的元数据信息。 |
| list_table_ids | 列出 BigQuery 数据集中的表 ID。 |
| get_table_info | 获取有关 BigQuery 表的元数据信息。 |
| execute_sql |
在项目中运行 SQL 查询并返回结果。 此工具仅限使用 如果查询调用远程函数或 Python UDF, 使用 查询费用将记入 |