Skip to main content
Glama

get_my_location

Retrieve your current geographic location using your IP address to determine position data.

Instructions

Get the location of the current IP address

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'get_my_location': checks tool name, calls ipfind.apiRequest.getMyLocation(), handles error, returns JSON response.
    if (request.params.name === "get_my_location") { const output = await ipfind.apiRequest.getMyLocation(); if (!output) { throw new Error("Failed to fetch my location."); } return { content: [ { type: "text", text: JSON.stringify(output, null, 2), }, ], }; }
  • src/index.ts:60-67 (registration)
    Registration of 'get_my_location' tool in ListToolsRequestSchema handler, including name, description, and empty input schema.
    { name: "get_my_location", description: "Get the location of the current IP address", inputSchema: { type: "object", properties: {}, }, },
  • Helper method in APIRequest class that performs the actual API call to retrieve the current IP location using the /me endpoint.
    async getMyLocation(): Promise<IPFindIPResponse> { return await this.makeRequest<IPFindIPResponse>(`/me?auth=${this.apiKey}`); }

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/ipfind/ipfind-mcp-server'

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