query_kg_edges
Explore relationships in a knowledge graph by filtering edges based on entity names or relationship types. Retrieve connections between deals, investors, startups, and scoring data with detailed metadata.
Instructions
Traverse Knowledge Graph edges by entity name and/or relationship type. Returns edges with source/target node IDs, relations, scores, and metadata. Use this to explore deal relationships, investor-startup connections, and scoring edges. Gracefully returns empty results if the Knowledge Graph is not configured.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entityName | No | Filter edges by entity name | |
| relationshipType | No | Filter edges by relationship type (e.g., "INVESTED_IN", "SCORED") | |
| limit | No | Max edges to return (default 100, max 500) |
Implementation Reference
- src/tools/knowledge.ts:91-112 (handler)The MCP tool registration and handler implementation for 'query_kg_edges'. It defines the input schema using Zod and invokes the 'queryKgEdges' method on the client object.
server.tool( 'query_kg_edges', `Traverse Knowledge Graph edges by entity name and/or relationship type. Returns edges with source/target node IDs, relations, scores, and metadata. Use this to explore deal relationships, investor-startup connections, and scoring edges. Gracefully returns empty results if the Knowledge Graph is not configured.`, { entityName: z.string().optional().describe('Filter edges by entity name'), relationshipType: z.string().optional().describe('Filter edges by relationship type (e.g., "INVESTED_IN", "SCORED")'), limit: z.number().min(1).max(500).optional().describe('Max edges to return (default 100, max 500)'), }, async ({ entityName, relationshipType, limit }, extra) => { const client = clientFactory(extra); const result = await client.queryKgEdges(entityName, relationshipType, limit); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2), }], }; } );