Skip to main content
Glama

ACTION_GET_LOCATION

Retrieves the last known GPS or network location, whichever is newer, for workflows needing coordinates without starting a fresh location request; location permission is required.

Instructions

读取系统最后一次已知位置(GPS/网络取较新者)(需定位权限)。输出:location_success, location_error, latitude, longitude, location_accuracy, location_time, location_summary。不主动定位:从没定位过会失败,结果可能是旧位置(看 location_time 毫秒时间戳)。location_accuracy 单位米。。字符串参数支持 ${var} 插值;结果以变量快照 JSON 返回。

Input Schema

NameRequiredDescriptionDefault
requireNo执行后要求为 true 的变量名(如 click_success),不满足按出错处理
on_errorNo节点出错时:skip=跳过继续(默认),stop=停止整个工作流
output_varNo"纬度,经度" 字符串存到的变量名(默认 location_summary)
node_timeout_msNo单节点超时毫秒,0=不限;默认 30 分钟

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden; it does disclose the permission requirement, the no-active-fix behavior, possible staleness, and units for accuracy and the millisecond timestamp. It does not say what location_error contains on permission denial or how the variable snapshot is scoped, which leaves gaps for a mutation-free but environment-dependent read.

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 core constraint (last known, not active) is front-loaded, and the enumerated output fields earn their place since no output schema exists. Minor waste from the doubled full stop and the slightly dense run-on parenthetical structure.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, listing the seven returned fields is genuinely necessary and is provided; staleness and permission caveats round it out. It would be complete with guidance on recovery when location_success is false, e.g. advising a fallback or an active-fix path.

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%, so the baseline is 3; the four workflow parameters (require, on_error, output_var, node_timeout_ms) are already documented inline. The description adds only the generic note that string parameters accept ${var} interpolation and that results return as a variable snapshot, which is useful but not parameter-specific.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a precise verb and resource: it reads the system's last known location, explicitly noting that the newer of GPS/network is chosen. The emphasis on 'last known / cached' rather than an active fix distinguishes it from any active-locate or geocoding sibling such as ACTION_GEOCODE.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It clearly states the precondition (requires location permission) and the key exclusion ('does not actively locate'), plus the failure case if the device has never been located. It stops short of naming alternatives or telling the agent what to do when it fails, so no explicit routing to a fallback tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.