Skip to main content
Glama
linancn

TianGong-LCA-MCP Server

by linancn

Search_processes_Tool

Find and retrieve Life Cycle Assessment (LCA) process data using the TianGong-LCA-MCP Server by entering specific queries for accurate results.

Instructions

Search LCA processes data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesQueries from user

Implementation Reference

  • Registers the 'Search_Processes_Tool' with the MCP server by calling server.tool() with schema and handler.
    export function regProcessSearchTool(server: McpServer, bearerKey?: string): void { server.tool( 'Search_Processes_Tool', 'Search LCA processes data.', input_schema, async ({ query }) => { const result = await searchProcesses( { query, }, bearerKey, ); return { content: [ { type: 'text', text: result, }, ], }; }, ); }
  • Main handler logic: sends POST request to Supabase edge function for hybrid search on processes data.
    async function searchProcesses({ query }: { query: string }, bearerKey?: string): Promise<string> { const url = `${supabase_base_url}/functions/v1/process_hybrid_search`; // console.error('URL:', url); try { const response = await fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${bearerKey}`, 'x-region': x_region, }, body: JSON.stringify( cleanObject({ query, }), ), }); if (!response.ok) { throw new Error(`HTTP error: ${response.status} ${response.statusText}`); } const data = await response.json(); return JSON.stringify(data); } catch (error) { console.error('Error making the request:', error); throw error; } }
  • Zod schema defining the input: query string.
    const input_schema = { query: z.string().min(1).describe('Queries from user'), };

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/linancn/tiangong-lca-mcp'

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