Skip to main content
Glama
certinia

Apex Log MCP Server

Official
by certinia

Search Apex Log Events

apexlog_search_events
Read-only

Search Apex debug log events in log order to inspect printed output, validation rules, and statements, filter by event type, namespace, or parent method, and page results to read full event text.

Instructions

Search the events of an Apex debug log in log order: what the code printed (USER_DEBUG), validation rules, statements, or every event under one method. For plain text in the saved .log, grep is cheaper; use this for event types, nesting, or without a shell. Text past 400 characters is elided; ask for one event by eventIndex to read up to 30,000.

Input Schema

NameRequiredDescriptionDefault
typeNoOnly these log event types, e.g. USER_DEBUG, VALIDATION_RULE
limitNoPage size (default: 50)
offsetNoRows to skip (default: 0): the last page's nextOffset
containsNoOnly events whose text holds this, ignoring case
namespaceNoOnly these namespaces
eventIndexNoOnly this event, with more of its text
logFilePathYesAbsolute path
parentEventIndexNoOnly events below this one

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.2

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only cover readOnly/openWorld; the description adds the behavior that matters — results come in log order, text beyond 400 characters is elided, and a single-event fetch by eventIndex returns up to 30,000 characters. That truncation-and-workaround disclosure is exactly the kind of trait an agent cannot infer from structured fields.

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 short sentences, no filler: purpose first, alternative second, truncation caveat last. Every clause carries information an agent needs to pick or invoke the tool.

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 an 8-parameter read tool with no output schema, the description covers selection, ordering, and truncation. It never sketches the returned row shape or how paging terminates; the schema mentions nextOffset, but the description would have been the place to connect it.

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 3 is the baseline, but the description adds real semantics beyond the schema: eventIndex is characterized as the way to defeat elision, and the paging model implied by ordinal results is at least gestured at. It does not explain limit/offset interaction or nextOffset explicitly.

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?

Specific verb and resource ('Search the events of an Apex debug log in log order') plus concrete examples of what counts as an event (USER_DEBUG, validation rules, statements, per-method nesting). It differentiates against grep but never mentions any sibling MCP tool such as apexlog_get_summary or apexlog_get_org_logs, so the differentiation is incomplete rather than absent.

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 an explicit when-not ('for plain text in the saved .log, grep is cheaper') and the conditions that select this tool instead ('event types, nesting, or without a shell'). It also routes within the tool itself: use eventIndex when you need the elided text.

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