Skip to main content
Glama
nebula-contrib

NebulaGraph MCP Server

list_spaces

Retrieve all available graph database spaces to explore data structures and relationships within NebulaGraph.

Instructions

List all available spaces Returns: The available spaces

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_spaces' tool, decorated with @mcp.tool() for registration in the MCP server. It connects to NebulaGraph, executes 'SHOW SPACES' query, and formats the list of available spaces as output.
    @mcp.tool()
    def list_spaces() -> str:
        """List all available spaces
        Returns:
            The available spaces
        """
        pool = get_connection_pool()
        session = pool.get_session(
            os.getenv("NEBULA_USER", "root"), os.getenv("NEBULA_PASSWORD", "nebula")
        )
    
        try:
            result = session.execute("SHOW SPACES")
            if result.is_succeeded():
                spaces = result.column_values("Name")
                return "Available spaces:\n" + "\n".join(f"- {space}" for space in spaces)
            return f"Failed to list spaces: {result.error_msg()}"
        finally:
            session.release()
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions the tool returns 'The available spaces' but doesn't disclose behavioral traits like whether this is a read-only operation, if it requires authentication, how results are formatted (e.g., pagination, ordering), or potential rate limits. This leaves significant gaps for a tool with no annotation coverage.

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

Conciseness4/5

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

The description is appropriately sized with two short sentences, but it's not perfectly structured. The first sentence states the purpose clearly, but the second sentence ('Returns: The available spaces') is redundant and adds little value, slightly reducing efficiency. Overall, it's concise but could be more streamlined.

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?

Given the tool's simplicity (0 parameters, no output schema), the description is incomplete. It lacks details on what 'spaces' are, how results are returned (e.g., list format, metadata), and behavioral context like safety or performance. Without annotations or output schema, the description should provide more context to be fully helpful.

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

Parameters4/5

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

The tool has 0 parameters, and schema description coverage is 100%, so there's no need for parameter details in the description. The baseline for 0 parameters is 4, as the description appropriately doesn't discuss parameters that don't exist, and the schema fully covers the input structure.

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

Purpose3/5

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

The description states the tool's purpose ('List all available spaces') which is clear but vague. It doesn't specify what 'spaces' are or how they differ from other resources, and doesn't distinguish this from sibling tools like 'get_space_schema' or 'find_neighbors'. The purpose is understandable but lacks specificity.

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 on when to use this tool versus alternatives. The description doesn't mention sibling tools like 'get_space_schema' for schema information or 'find_neighbors' for relationships, nor does it specify prerequisites or appropriate contexts for listing spaces versus other operations.

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

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/nebula-contrib/nebulagraph-mcp-server'

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