Skip to main content
Glama

get_logs

Retrieve the last N lines from a DBngin PostgreSQL or Redis service log, defaulting to 50 and capped at 1000, using the service name, ID, or type to target the correct log.

Instructions

Return the last N lines (default 50, max 1000) of a DBngin service log. PostgreSQL reads '/pg_log.log'; Redis reads the DBngin Engines/redis log file written when started through this server. Pass 'name' plus optional 'type' (or 'id') and 'lines'.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoDBngin service ID from list_services. Takes precedence over 'name'.
nameNoService name as shown in DBngin (case-insensitive). Names can repeat across engine types; pass 'type' to disambiguate (e.g. { name: 'myapp', type: 'redis' }).
typeNoEngine type used to disambiguate services that share the same name.
linesNoNumber of trailing lines to return (default 50, max 1000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does fairly well: it discloses the exact on-disk source per engine and, importantly, that the Redis log only exists when the service was started through this server — a non-obvious caveat that would otherwise cause confusing empty results. It stops short of saying what happens when the log file is missing or empty, or whether the response is raw text.

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

Conciseness4/5

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

Three compact sentences, front-loaded with the action and its bounds, followed by engine-specific detail and then the invocation hint. Slight redundancy in restating the default 50 / max 1000 that the schema already declares, but nothing wasteful enough to hurt readability.

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 four-parameter, zero-annotation, no-output-schema tool, key operational facts are covered (paths, defaults, disambiguation), but the return shape is only implied ("last N lines") and failure behavior for absent/empty logs is unspecified. An agent can call it, but cannot fully predict what comes back or how errors surface.

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 'id' precedence, case-insensitive names, and the 'type' enum used for disambiguation. The description echoes the name/type/id relationship and the lines default/max without adding new syntax or format meaning beyond the schema, so the 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?

"Return the last N lines ... of a DBngin service log" names a specific verb, resource, and default/limit, and the per-engine file paths (pg_log.log for PostgreSQL, the DBngin Engines/redis file for Redis) make the scope unmistakable. It is clearly a read-logs tool, distinguishable at a glance from the lifecycle siblings (start/stop/restart/status).

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 last sentence gives concrete invocation guidance (pass 'name' plus optional 'type' or 'id', and 'lines'), which is useful for picking parameters. However, there is no guidance on when to reach for this tool versus service_status or the lifecycle tools, and no stated preconditions (e.g. does the service need to be running to have a log?).

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