UNPKG

littlesis-mcp

Version:

MCP server for LittleSis API - track corporate power and accountability

41 lines 1.17 kB
import { LittleSisApi } from '../api.js'; export const getRelationshipTool = { name: 'get_relationship', description: 'Get detailed information about a specific relationship between two entities', inputSchema: { type: 'object', properties: { id: { type: 'number', description: 'The unique numerical ID of the relationship in LittleSis database' } }, required: ['id'] } }; // Tool handler export async function handleGetRelationship(args) { try { const result = await LittleSisApi.getRelationship(args.id); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error fetching relationship: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } } //# sourceMappingURL=relationship-tools.js.map