Skip to main content
Glama

Get the caller's approximate location via IP

bus_get_my_location
Read-onlyIdempotent

Identify your city-level location from your public IP to determine your city and enable nearby bus stop lookups.

Instructions

Resolve the caller's approximate location from their public IP — useful when the user asks something like "what's near me" without providing coordinates.

Precision is city-level (typically a few kilometres). Good enough to identify the city and seed bus_get_nearby_stops with a starting guess. NOT precise enough to find the user's actual bus stop — for that, ask for a landmark/address and resolve it via bus_search.

Caveats:

  • Resolves via ip-api.com (free tier; rate-limited but no auth).

  • VPN / corporate proxy → result reflects the proxy exit IP, not the user.

  • Cellular IPs often land on a provincial centroid.

Args:

  • ip (string, optional): a specific IPv4/IPv6 to look up. Omit to use the mcp server process's own outbound IP (= the caller's machine when running locally).

  • response_format ('markdown' | 'json')

Returns (json): { "lat": 31.2222, "lng": 121.4581, "gpsType": "wgs", "city": "上海", "region": "上海市", "country": "中国", "ip": "116.236.0.1", "isp": "China Telecom", "precision": "city-level (~10 km); not suitable for stop-level queries" }

Suggested workflow:

  1. Call this tool to identify the user's city (match 'city' field against bus_list_cities to get a cityId).

  2. Pass lat/lng into bus_get_nearby_stops for a rough nearby list, OR ask the user to confirm a landmark and use bus_search.pois for sharper coordinates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipNoOptional override IP to look up. Omit to use the mcp server's own outbound IP (i.e. the caller's machine).
response_formatNoOutput format: 'markdown' for human-readable text, 'json' for full structured datamarkdown
Behavior5/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false. Description adds significant context: precision (city-level ~10 km), data source (ip-api.com), rate limits, no auth, caveats for VPN/cellular IPs, and return structure. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with sections: purpose, precision, caveats, args, returns, suggested workflow. Every sentence adds value without redundancy. Front-loaded with the main purpose, followed by important limitations and usage guidance.

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

Completeness5/5

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

Given the tool's simplicity (2 optional params), the description fully covers inputs, outputs, behavior, limitations, and integration with sibling tools. No gaps remain despite lack of output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with clear descriptions. The description adds value by explaining the ip parameter's default behavior (omitting uses server's outbound IP) and response_format options. The return example with fields like lat, lng, city, and precision note compensates for missing output schema.

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 clearly states the tool resolves approximate location from public IP, specific verb 'Resolve' and resource 'caller's approximate location'. It distinguishes from siblings by stating it's not for precise stop-level queries, and suggests nearby stops tool for that.

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

Usage Guidelines5/5

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

Explicit usage context: 'when user asks what's near me without coordinates'. Provides when-not-to-use: not for stop-level accuracy. Suggests alternative tools and a complete workflow: call this, then use bus_get_nearby_stops or bus_search.

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

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/PeanutSplash/chelaile-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server