Skip to main content
Glama
ArcadeData

ArcadeDB Multi-Model DBMS

Official

query

Execute read-only queries in ArcadeDB using SQL, Cypher, Gremlin, GraphQL, or MongoDB syntax to retrieve data from multi-model databases.

Instructions

Execute a read-only (idempotent) query against an ArcadeDB database. Use this for SELECT, MATCH, and other read operations. Prefer OpenCypher (language: 'cypher') unless SQL is explicitly requested.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseYesThe name of the database to query
languageNoQuery language: 'sql', 'cypher', 'gremlin', 'graphql', 'mongo'cypher
queryYesThe query to execute
limitNoMaximum number of results to return (default: 1000)

Implementation Reference

  • The handler logic for the 'query' method within the Database class, which executes a database query using the underlying Java implementation.
    def query(self, language: str, command: str, *args) -> ResultSet:
        """Execute a query and return results."""
        self._check_not_closed()
        try:
            if args:
                # Convert NumPy arrays to Java float arrays
                converted_args = []
                for arg in args:
                    if (
                        hasattr(arg, "__class__")
                        and arg.__class__.__name__ == "ndarray"
                    ):
                        converted_args.append(to_java_float_array(arg))
                    else:
                        converted_args.append(arg)
                java_result = self._java_db.query(language, command, *converted_args)
            else:
                java_result = self._java_db.query(language, command)
            return ResultSet(java_result)
        except Exception as e:
            raise ArcadeDBError(f"Query failed: {e}") from e
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key traits: it's 'read-only (idempotent)', specifies supported query languages (OpenCypher, SQL, others), and implies a default language preference. However, it lacks details on error handling, performance limits, or authentication needs, leaving some behavioral aspects unclear.

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 front-loaded with the core purpose and efficiently structured in two sentences. The first sentence covers the tool's function and constraints, while the second provides usage guidance. There is no wasted text, and every element adds value, making it highly concise and well-organized.

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

Completeness4/5

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

Given the tool's moderate complexity (4 parameters, no output schema, no annotations), the description is mostly complete. It covers purpose, usage, and key behavioral traits. However, it lacks details on output format, error handling, or advanced usage scenarios, which could be important for an AI agent to invoke it correctly in edge cases.

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?

The input schema has 100% description coverage, so the baseline is 3. The description adds minimal parameter semantics beyond the schema, only reinforcing the language preference ('Prefer OpenCypher') and hinting at query types ('SELECT, MATCH'). It doesn't explain parameter interactions or provide additional context for the 'database' or 'query' parameters.

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

Purpose5/5

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

The description clearly states the tool's purpose with specific verbs ('execute a read-only query') and resources ('against an ArcadeDB database'), distinguishing it from siblings like 'execute_command' (likely for write operations) and 'get_schema' (metadata retrieval). It specifies the types of operations (SELECT, MATCH) and the target system, making the purpose unambiguous.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool ('for SELECT, MATCH, and other read operations') and when to prefer alternatives ('Prefer OpenCypher unless SQL is explicitly requested'). It also implicitly distinguishes from siblings by focusing on read-only queries, suggesting 'execute_command' might be for write operations, though not explicitly named.

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/ArcadeData/arcade-db-multi-model-dbms'

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