Skip to main content
Glama
kuzudb

Kuzu MCP server

Official
by kuzudb

query

Execute Cypher queries on a Kuzu graph database to retrieve, create, or modify data. Integrates with tools like Claude Desktop or Cursor for streamlined database interactions.

Instructions

Run a Cypher query on the Kuzu database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cypherNoThe Cypher query to run

Implementation Reference

  • Handler for the "query" tool: extracts cypher from arguments, executes it using conn.query, retrieves all rows, serializes with bigint replacer, and returns as text content.
    if (request.params.name === "query") {
      const cypher = request.params.arguments.cypher;
      try {
        const queryResult = await conn.query(cypher);
        const rows = await queryResult.getAll();
        queryResult.close();
        return {
          content: [{
            type: "text", text: JSON.stringify(rows, bigIntReplacer, 2)
          }],
          isError: false,
        };
      } catch (error) {
        throw error;
      }
  • index.js:150-162 (registration)
    Registration of the "query" tool in the ListTools response, including name, description, and input schema.
    {
      name: "query",
      description: "Run a Cypher query on the Kuzu database",
      inputSchema: {
        type: "object",
        properties: {
          cypher: {
            type: "string",
            description: "The Cypher query to run",
          },
        },
      },
    },
  • Input schema definition for the "query" tool, specifying the required 'cypher' string parameter.
    inputSchema: {
      type: "object",
      properties: {
        cypher: {
          type: "string",
          description: "The Cypher query to run",
        },
      },
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure but only states the basic function. It doesn't mention whether this is a read-only or write operation, what permissions are required, potential side effects, error handling, or any limitations like query complexity or timeout constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise - a single sentence that directly states the tool's purpose with zero wasted words. It's front-loaded with the essential information and contains no unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a database query tool with no annotations and no output schema, the description is insufficient. It doesn't explain what kind of results to expect, error conditions, or the fact that this appears to be a general-purpose query tool versus the schema-specific sibling. The agent lacks crucial context for proper tool selection and invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the single 'cypher' parameter. The description doesn't add any additional meaning about parameter usage beyond what the schema provides, maintaining the baseline score for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Run a Cypher query') and target resource ('on the Kuzu database'), providing specific verb+resource pairing. However, it doesn't differentiate from the sibling tool 'getSchema' - both could involve querying but for different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use this tool versus the sibling 'getSchema' tool, nor any context about appropriate use cases. The description simply states what the tool does without indicating when it should be selected over alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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/kuzudb/kuzu-mcp-server'

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