Skip to main content
Glama

existdb_execute_query

Execute XQuery expressions on eXist-db via REST API to retrieve and analyze XML/TEI data for digital humanities projects.

Instructions

Executes an XQuery expression against a live eXist-db instance via the REST API and returns the results. Requires EXISTDB_ENDPOINT, EXISTDB_USER, EXISTDB_PASSWORD env vars, or pass endpoint/username/password directly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxNoMaximum number of results to return (default: 50)
startNoStart position in result set (default: 1)
xqueryYesThe XQuery expression to execute
endpointNoeXist-db base URL (overrides EXISTDB_ENDPOINT env var)
passwordNoeXist-db password (overrides EXISTDB_PASSWORD env var)
show_rawNoInclude the raw XML REST API response (default: false)
usernameNoeXist-db username (overrides EXISTDB_USER env var)
collectionNoCollection context path (default: '/')
Behavior2/5

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

No annotations are provided, so the description must carry the full burden. It discloses authentication requirements but does not warn that XQuery execution may have side effects (updates/deletions), nor does it mention error behavior. Arbitrary code execution is a significant behavioral trait left unmentioned.

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?

Two sentences, front-loaded with the primary action. No redundant language; achieves the purpose quickly and edits cleanly.

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 an 8-parameter tool with no output schema or annotations, the description is sparse. It omits return format, pagination behavior, error handling, and safety considerations. The schema explains parameter details but not the execution environment or when to use this vs sibling tools.

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 coverage is 100% for all 8 parameters, so the baseline is 3. The description only echoes the endpoint/username/password params without adding semantics on max/start pagination or collection context, which are already covered in the schema.

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 verb 'Executes' and the resource 'XQuery expression against a live eXist-db instance via the REST API', distinguishing it from sibling tools that validate or lookup functions. It's specific and unambiguous.

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 when-to-use or alternative guidance is given. It only states prerequisites (env vars/direct params). There is no mention of using existdb_validate_xquery for validation or existdb_search_functions for search, which are natural 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

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/orazionelson/existdb-mcp'

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