Skip to main content
Glama
advancedcommunities

Salesforce MCP Server

apex_get_log

Read-onlyIdempotent

Retrieve a specified Apex log by ID or a chosen number of recent Salesforce org logs to inspect debug output and diagnose issues.

Instructions

Fetch the specified log or given number of most recent logs from the org.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is fully covered by structured data. The description adds only the org-wide scope ('from the org'); it says nothing about log size, truncation, or return format, so it adds limited value beyond annotations.

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?

A single tight sentence with the two operating modes front-loaded and no filler. Nothing is wasted, though it is arguably too terse for a tool whose sibling overlap and return semantics need clarification.

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 read-only tool with annotations covering safety and a schema documenting each nested field, the description is minimally adequate. It leaves the return value shape (log content vs metadata) and the relationship to the sibling apex_log_list unexplained, which matters because no output schema exists.

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?

The description conveys that either a specific log or a count of recent logs can be requested, which maps onto logId vs recentLogsNumber. But the schema's nested properties already carry the real parameter documentation (including the pointer to apex_get_logs for IDs and the targetOrg default behavior), so the description adds little beyond it.

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 (Fetch) and resource (log) and clarifies the two modes: a specific log by ID or the N most recent logs. However it does not differentiate itself from the sibling apex_log_list, which appears to serve a similar listing purpose, so an agent cannot tell the two apart from the description alone.

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

Usage Guidelines2/5

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

No when-to-use guidance is given. There is no mention of how this differs from apex_log_list, nor any prerequisite or context such as needing a log ID first (that hint lives only in the schema's logId description). The agent must infer usage entirely.

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