Skip to main content
Glama
irfanfath123

homelab-monitor-mcp

by irfanfath123

db_query

Run read-only SELECT/WITH SQL queries against a Laravel project's database via .env credentials, with capped rows and timeout.

Instructions

Run a READ-ONLY SQL query (SELECT/WITH) against a Laravel project's database. Credentials come from the project's .env — never returned. Rows capped by limit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSingle SELECT query (read-only; no stacked statements)
limitNoMax rows (default 50, max 500)
project_dirYesAbsolute Laravel project path inside HOMELAB_PROJECT_DIRS (contains .env)
timeout_secsNoQuery timeout in seconds (default 30)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it declares read-only enforcement, that credentials are sourced from .env and never returned, and that rows are capped by limit. It omits query error behavior and the fact that it can target any project dir within the allowed roots, but the key safety and auth traits are disclosed.

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?

Three tight sentences, front-loaded with the operation and its read-only constraint, then credentials handling, then the row cap. Every sentence carries distinct information with no filler.

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?

No output schema exists, but the return shape is largely self-evident for a query tool (result rows from the SELECT), and the credential/row-cap notes cover the main surprises. It is nearly complete, though it could state the result envelope or error signaling.

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 four parameters with defaults and bounds. The description only restates the limit cap ('Rows capped by limit') and adds nothing about timeout_secs or the project_dir allowlist, so baseline 3 applies.

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?

Specific verb ('Run') plus precise resource ('READ-ONLY SQL query against a Laravel project's database') with an explicit scope constraint (SELECT/WITH). No sibling tool operates on a database, so an agent can immediately tell this apart from read_file or run_command.

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 read-only SELECT/WITH restriction implies the intended use case, but there is no explicit statement of when to reach for this versus alternatives such as run_command or reading files. Usage is inferable rather than stated.

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