twining_graph_query
Search a knowledge graph for entities by name or property substring match to retrieve matching entities with their properties.
Instructions
Search the knowledge graph for entities by name or property substring match. Case-insensitive. Returns matching entities with their properties.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Substring to search for in entity names and properties | |
| entity_types | No | Filter to only these entity types | |
| limit | No | Maximum results to return (default: 10) |
Implementation Reference
- src/tools/graph-tools.ts:164-180 (handler)The handler for the twining_graph_query tool which calls engine.query.
async (args) => { try { const result = await engine.query( args.query, args.entity_types, args.limit, ); return toolResult(result); } catch (e) { if (e instanceof TwiningError) { return toolError(e.message, e.code); } return toolError( e instanceof Error ? e.message : "Unknown error", "INTERNAL_ERROR", ); } - src/tools/graph-tools.ts:147-163 (registration)Registration of the twining_graph_query tool including its input schema.
server.registerTool( "twining_graph_query", { description: "Search the knowledge graph for entities by name or property substring match. Case-insensitive. Returns matching entities with their properties.", inputSchema: { query: z.string().describe("Substring to search for in entity names and properties"), entity_types: z .array(z.string()) .optional() .describe("Filter to only these entity types"), limit: z .number() .optional() .describe("Maximum results to return (default: 10)"), }, },