Skip to main content
Glama
certinia

Apex Log MCP Server

Official
by certinia

List Slow Apex Log Operations

apexlog_list_slow_operations
Read-only

Ranks Apex debug log operations by self time or retained heap, showing calls, durations, database counts, and query plans to reveal bottlenecks and what to optimize.

Instructions

Rank what an Apex debug log spent its time on by self-execution time, or on the heap it retains - code units, methods, queries, searches, DML, flows and workflows in one table, each row with its calls, durations, database counts and rows, so the caller can see what to optimize and why, beside the query optimizer's plan for the queries among them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoRank only these log event types, e.g. SOQL_EXECUTE_BEGIN, DML_BEGIN, METHOD_ENTRY
limitNoPage size (default: 10); fewer if the page would be too large
offsetNoRanked rows to skip (default: 0). Advance it by the rows you got, which can be fewer than limit.
sortByNoDefault durationSelfMs. heapSelfNetBytes adds that column.
groupByNoFold repeats into one row; default name. callerNamespace attributes platform DML to the package that drove it. debugCategory folds a namespace's event types together and so states no type or name. none ranks each call on its own. A grouped durationTotalMs is what the transaction takes back if the group never runs - never sum it across rows.
minSelfMsNoDrop operations below this self time (default: 0), whichever sortBy is used
namespaceNoRank only these namespaces
logFilePathYesAbsolute path
debugCategoryNoRank only these debug log categories

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.1

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds useful output context (rows carry calls, durations, database counts and rows, plus the optimizer plan for queries), but says nothing about permissions, log-file prerequisites, or how pagination interacts with ranking.

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?

One dense sentence that front-loads the ranking dimension and then the row contents. It is long but every clause carries information; it would be tighter with the output-shape detail folded into a structured return description.

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 must describe the return shape, and it does: a single table of ranked rows with calls, durations, database counts/rows, plus the query optimizer plan. What is missing is the framing around the two sort modes and how the plan column appears per query.

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 all nine parameters are already documented in the schema, including the groupBy folding caveat and the heapSelfNetBytes column behavior. The description's mentions of self-execution time and retained heap map onto sortBy but add no syntax or format detail beyond the schema. Baseline 3 applies.

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 ('Rank') and resource ('what an Apex debug log spent its time on'), and enumerates the covered event families (code units, methods, queries, searches, DML, flows, workflows). An agent can tell this is a ranked-hotspot report tool, but the description never distinguishes itself from siblings like apexlog_list_limit_risks or apexlog_get_summary.

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 closing clause 'so the caller can see what to optimize and why' implies the optimization-diagnosis use case, but there is no explicit when-to-use, when-not-to-use, or named alternative such as apexlog_get_summary for a high-level view. 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.