Skip to main content
Glama
campertunity

Campertunity MCP Server

Official
by campertunity
place_details.ts977 B
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { z } from 'zod'; import { CampertunityClient } from '../campertunity/client.js'; // NOTE: This is a tool since tools are more supported by the MCP protocol export const placeDetailsTool = (server: McpServer, campertunityClient: CampertunityClient) => { server.tool( 'place-details', { placeId: z.string().describe('The id of the place to get details for.'), }, async ({ placeId }) => { try { const place = await campertunityClient.get(`/place/details?placeId=${placeId}`); return { content: [ { type: 'text', text: JSON.stringify(place), mimeType: 'application/json', }, ], }; } catch (error) { return { content: [{ type: 'text', text: 'Error: ' + (error as Error).message }], isError: true, }; } } ); };

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

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