Skip to main content
Glama
oracle-mcp-server

oracle-mcp-server

by Tommi2Day

trace_content

Read Oracle trace files to inspect the first or last lines or filter by text such as ORA- errors or SQL IDs; treat output as sensitive.

Instructions

Read a trace file through V$DIAG_TRACE_FILE_CONTENTS: the last (default) or first lines, optionally only lines containing a text (e.g. ORA-, a sql_id). Use the file name from trace_files or alert_log. Trace files can contain SQL text and data values — handle the output as sensitive.

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": {
      "file": "<file>"
    },
    "name": "trace_content"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesTrace file name, e.g. FREE_ora_1234.trc (a path is reduced to its file name)
linesNoNumber of lines (default 200)
contextNoWith contains: lines of context before and after each match, like grep -C (default 0)
containsNoCase-insensitive substring filter on the line (applied before head/tail)
positionNoReturn the last or first lines (default tail)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the default behavior (last lines), that filtering happens over line content, and a real behavioral trait: output may contain SQL text and data values and should be handled as sensitive. It does not cover failure behavior for a missing file, the 2000-line cap, or how context lines are formatted.

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, both front-loaded: the operation and its variant first, then the argument source. Every clause carries information — access path, defaults, filter example, and the sensitivity warning — with no padding.

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?

For a five-parameter read tool with a fully documented schema and no output schema, the description covers what the tool does, where the file argument comes from, and the nature of the returned content including its sensitivity. Only edge-case behavior (missing file, truncation) is left unspecified, which 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%, so the baseline is 3, but the description adds meaning by stating the default position is tail and by giving concrete examples of what to pass to contains (ORA-, a sql_id). This tells an agent more about intent than the raw enum and string field descriptions do.

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?

States a specific verb and resource: read a trace file via V$DIAG_TRACE_FILE_CONTENTS, returning tail (default) or head lines with an optional substring filter. It also names the source of the file argument (trace_files or alert_log), which implicitly separates it from the listing tools. It stops short of explicitly contrasting with a sibling reader, so it lands at 4 rather than 5.

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

Usage Guidelines4/5

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

"Use the file name from trace_files or alert_log" gives a clear prerequisite and workflow context, and "optionally only lines containing a text (e.g. ORA-, a sql_id)" shows the intended filtering use case. There is no explicit when-not or statement of what to do if a file is absent, but the usage context is clear.

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