查詢實體位置與朝向
mc_query_targetQuery entity coordinates, orientation, and unique ID via selector to get current player or agent position. Returns resolved JSON for precise building placement.
Instructions
用選擇器查詢實體的座標、朝向與唯一 ID,回傳已解析的 JSON。這是取得玩家或 Agent 目前位置的正規做法——建造前先問這個,才知道要蓋在哪裡。預設用 @p(最近的玩家)而非 @s:WebSocket 送進來的指令沒有實體身分,@s 在部分情況下無法解析。
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "mc_query_target"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | 目標選擇器(@a/@p/@s/@e/@r,可帶 [])或玩家名稱 | @p |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | Yes | ||
| details | No | ||
| elapsedMs | Yes | ||
| statusCode | Yes | ||
| commandLine | Yes | ||
| statusMessage | Yes |