Skip to main content
Glama

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
NameRequiredDescriptionDefault
queryYesSubstring to search for in entity names and properties
entity_typesNoFilter to only these entity types
limitNoMaximum results to return (default: 10)

Implementation Reference

  • 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",
        );
      }
  • 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)"),
        },
      },

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/daveangulo/twining-mcp'

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