Skip to main content
Glama
RestDB

Codehooks.io MCP Server

by RestDB

query_collection

Query data from collections using URL-style, regex, or MongoDB-style JSON queries. Supports system collections like '_hooks' to discover API endpoints and deployment metadata.

Instructions

Query data from a collection. Supports URL-style, regex, and MongoDB-style JSON queries with comparison operators. Can also query system collections like '_hooks' which contains deployment metadata including available API endpoints. Using delete, update or replace is very powerful but also dangerous, so use with caution.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionYesCollection name. Use '_hooks' to query deployment metadata and discover available API endpoints.
queryNoQuery expression. Supports multiple formats: URL-style ('name=Polly&type=Parrot'), regex ('name=/^po/'), or MongoDB-style JSON ('{"name": "Polly", "age": {"$gt": 5}}' for complex queries with operators like $gt, $lt, $gte, $lte, $ne, $in, $nin, $exists, $regex). To get the latest deployment info with API endpoints, use: collection='_hooks', limit=1, reverse=true (check the routehooks property for the available API endpoints)
countNoCount query results
deleteNoDelete all items from query result
updateNoPatch all items from query result with JSON string '{...}'
replaceNoReplace all items from query result with JSON string '{...}'
useindexNoUse an indexed field to scan data in query
startNoStart value for index scan
endNoEnd value for index scan
limitNoLimit query result. Use limit=1 and reverse to get latest deployment from _hooks collection
fieldsNoComma separated list of fields to include
sortNoComma separated list of fields to sort by. Use '_id' to sort by creation time
offsetNoSkip items before returning data in query result
enqueueNoAdd query result to queue topic
reverseNoScan index in reverse order. Use with sort='_id' to get newest records first
csvNoOutput data in CSV format
jsonlNoOutput data in JSONL format
Behavior4/5

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

With no annotations provided, the description carries full burden and does well: it discloses that the tool supports multiple query formats (URL-style, regex, MongoDB-style), reveals the existence of system collections like '_hooks' with metadata, and explicitly warns about dangerous operations (delete/update/replace being 'very powerful but also dangerous'). It doesn't cover rate limits, authentication needs, or pagination behavior, but provides substantial behavioral context beyond basic functionality.

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

Conciseness3/5

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

The description is reasonably concise (three sentences) but could be better structured. The first sentence covers core functionality, the second adds important context about system collections, and the third provides a warning. However, the warning about dangerous operations feels tacked on rather than integrated, and the description doesn't front-load the most critical information about query formats and capabilities.

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

Completeness3/5

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

For a complex tool with 17 parameters, no annotations, and no output schema, the description provides adequate but incomplete coverage. It explains what the tool does and some behavioral aspects, but doesn't describe return values, error conditions, or performance characteristics. The warning about dangerous operations is valuable, but more context about mutation consequences would help. Given the complexity, the description should do more to compensate for missing structured data.

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 all 17 parameters thoroughly. The description adds some context about the '_hooks' collection and dangerous operations, but doesn't provide additional parameter semantics beyond what's in the schema descriptions. It mentions query formats generally but doesn't elaborate on parameter interactions. Baseline 3 is appropriate when schema does heavy lifting.

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 tool's purpose: 'Query data from a collection' with specific query format support. It distinguishes from siblings by mentioning query capabilities and system collections like '_hooks', but doesn't explicitly contrast with other query-related tools (none listed in siblings). The verb+resource combination is clear, though sibling differentiation is implicit rather than explicit.

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

Usage Guidelines3/5

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

The description provides some usage context: it mentions the special '_hooks' collection for deployment metadata and warns about dangerous operations (delete/update/replace). However, it doesn't explicitly state when to use this tool versus alternatives (like 'collection' or 'export' from siblings), nor does it provide clear exclusion criteria. The guidance is helpful but incomplete for tool selection.

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/RestDB/codehooks-mcp-server'

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