Skip to main content
Glama
search.ts895 B
/* * @Author: AidenYangX * @Email: xscs709560271@gmail.com * @Date: 2024-12-21 23:58:32 * @Description: Search Handler */ import { BaseHandler } from "./base.js"; import { GeocodingArgsSchema } from "../../schemas/search/geocoding.js"; import { handleGeocoding } from "../../tools/handlers/search/geocoding.js"; import { GEOCODING_TOOL } from "../../tools/definitions/search/geocoding.js"; export class SearchHandler extends BaseHandler { constructor() { super(); this.tools.add("mapbox_geocoding"); this.toolDefinitions.push(GEOCODING_TOOL); } async handle({ name, args }: { name: string; args: any }) { switch (name) { case "mapbox_geocoding": { const validatedArgs = GeocodingArgsSchema.parse(args); return await handleGeocoding(validatedArgs); } default: throw new Error(`Unsupported search tool: ${name}`); } } }

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

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