Skip to main content
Glama
Tdarr MCP Server

Tdarr MCP Server

by OrellBuehler

query_database

Read-only

Reads a Tdarr database collection directly for data not covered by dedicated tools, such as settings, variables, staged items, jobs, and statistics. Read-only access with no insert, update, or remove operations.

Instructions

Read a Tdarr database collection directly (POST /api/v2/cruddb) for anything the dedicated tools do not cover — global settings, variables, staged items, jobs, statistics. Read-only: this tool cannot insert, update or remove documents. 'getAll' on FileJSONDB returns the entire file database, so prefer search_files there.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "collection": "<collection>",
      "mode": "<mode>"
    },
    "name": "query_database"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesgetAll returns every document; getById and getByIndex look one up by doc_id
doc_idNoDocument ID, required for getById and getByIndex
collectionYesCollection to read

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.0
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description reinforces this with the notable detail that the read happens via a POST endpoint but still cannot write. It also discloses a volume hazard (getAll on FileJSONDB dumps the whole file database), which is behavior beyond what the annotation conveys; it does not cover auth, rate limits, or result shape.

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 dense sentences with the capability and scoping stated first, followed by the safety and volume caveats. No filler, and the most consequential warning is placed where it will be read before invocation.

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?

With no output schema, the description does partially indicate what comes back ('returns the entire file database') and warns about volume, which is the main completeness risk for a generic CRUD passthrough. It stops short of describing the document shape or pagination, but the tool is a thin passthrough so that is a minor gap.

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?

Schema coverage is 100% with enums for collection and mode, so the baseline would be 3. The description adds consequence-level meaning — what getAll versus lookup modes mean in practice and the collection-specific pitfall for FileJSONDB — which goes beyond the schema's terse field descriptions.

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?

States a specific verb and resource (read a Tdarr database collection), names the underlying endpoint, and enumerates the kinds of data it covers — global settings, variables, staged items, jobs, statistics. The clause 'for anything the dedicated tools do not cover' explicitly positions it against the get_*-style siblings.

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?

Gives a clear when-to-use rule (fallback for cases the dedicated tools don't cover) and a concrete when-not/alternative for the risky case: 'getAll' on FileJSONDB should be replaced by search_files. The explicit statement that it cannot insert, update or remove further draws the boundary against mutation tools.

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