Skip to main content
Glama
certinia

Apex Log MCP Server

Official
by certinia

Get Org Debug Logs

apexlog_get_org_logs

Downloads Salesforce Apex debug logs by ID or the newest N, saving each file to disk and returning its path for use with the analysis tools. Use it to fetch logs before profiling.

Instructions

Download debug logs from a Salesforce org, by id or the newest N, and return each saved file's path, which the analysis tools accept.

Input Schema

NameRequiredDescriptionDefault
idsNoLog ids, from apexlog_list_org_logs
latestNoThe newest N logs, in place of ids (default: 1)
outputDirNoLog directory (default: .apex-log-mcp/ in the first client root, else cwd)
targetOrgNoAlias or username of the target Salesforce org. Uses the project default if not specified.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.2

TDQS

A3.6/5.0
Behavior3/5

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

The description usefully discloses that files are saved locally and their paths are returned for downstream analysis. However, with only destructiveHint=false in annotations, it does not cover overwrite behavior, permissions, or rate limits.

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?

A single sentence that front-loads the core action and ends with the most important output detail: saved file paths accepted by analysis tools.

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?

The description covers the essential workflow: download logs and return file paths for analysis. With no output schema, it appropriately explains the return value; minor gaps like overwrite behavior are acceptable given the schema's parameter detail.

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 coverage is 100%, so parameter meaning is already well documented. The description reinforces the id/latest N selection and output path usage, but adds little beyond the schema.

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: download debug logs from a Salesforce org, selectable by id or newest N. It distinguishes itself from the listing sibling by focusing on download and local file paths, though it does not explicitly name the sibling.

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 description implies the tool is used before analysis tools because it returns paths they accept, but it does not explicitly state when to use ids versus latest N or when to choose this over listing logs.

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