Skip to main content
Glama

find_trips

Search for custom web data extraction trips in the LSD database to extend research and functionality through internetdata SDK.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Implementation Reference

  • Core handler function that executes the find_trips logic: searches LSD trips via runLSD, maps to dynamic tools using toToolDefinition, registers them using registerTools, and returns the trip results.
    export const findTrips = async (server: McpServer, query: string) => { const result = await runLSD(`SEARCH "${query.replaceAll("\"", "'")}"`); registerTools(server, result.map(toToolDefinition)); return result; };
  • src/trips.ts:37-49 (registration)
    Function that registers the 'find_trips' tool on the MCP server, including the input schema { query: z.string() } and the tool handler that invokes findTrips and returns formatted content response.
    export const applyTripsTool = (server: McpServer) => { server.tool("find_trips", { query: z.string() }, async ({ query }) => { const result = await findTrips(server, query); return { content: [ { type: "text", text: JSON.stringify(result), }, ], }; }); };
  • src/index.ts:16-16 (registration)
    Top-level call during server setup that triggers registration of the find_trips tool.
    applyTripsTool(server);
  • Helper utility that transforms an LSD trip database row into a dynamic MCP tool definition for use in findTrips.
    const toToolDefinition = ( row: Record<string, any>, ): { name: string; description: string; tool: ToolCallback } => { return { name: row["NAME"], description: row["DESCRIPTION"], tool: async () => { const result = await runLSD(row["STATEMENT"]); return { content: [ { type: "text", text: JSON.stringify(result), }, ], }; }, }; };

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/lsd-so/internetdata-mcp'

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