Skip to main content
Glama
AdminexpressTool.ts888 B
import { logger, MCPTool } from "mcp-framework"; import { z } from "zod"; import { getAdminUnits, ADMINEXPRESS_TYPES, ADMINEXPRESS_SOURCE } from "../gpf/adminexpress.js"; interface AdminexpressInput { lon: number; lat: number; } class AdminexpressTool extends MCPTool<AdminexpressInput> { name = "adminexpress"; description = `Renvoie les unités administratives (${ADMINEXPRESS_TYPES.join(', ')}) pour une position donnée par sa longitude et sa latitude (source : ${ADMINEXPRESS_SOURCE}).`; schema = { lon: { type: z.number(), description: "La longitude du point", }, lat: { type: z.number(), description: "La latitude du point", }, }; async execute(input: AdminexpressInput) { logger.info(`adminexpress(${input.lon},${input.lat})...`); return getAdminUnits(input.lon, input.lat); } } export default AdminexpressTool;

Implementation Reference

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/ignfab/geocontext'

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