Skip to main content
Glama
Gearset MCP Server
by jaredbt

Get Anonymous Apex Audit

get_anonymous_apex_audit

Retrieves anonymous Apex execution audit records from the Audit API for a date range, with optional username and Salesforce org filters.

Instructions

Get anonymous Apex execution audit data from the Audit API

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": {
      "StartDate": "<StartDate>",
      "EndDate": "<EndDate>"
    },
    "name": "get_anonymous_apex_audit"
  }
}

Input Schema

NameRequiredDescriptionDefault
EndDateYesEnd date/time in UTC format (e.g., 2024-01-31T23:59:59Z)
UsernameNoThe Gearset username to filter by
StartDateYesStart date/time in UTC format (e.g., 2024-01-01T00:00:00Z)
OrgUsernameNoThe Salesforce org username to filter by

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, yet it only says data comes from the Audit API. It omits whether results are paginated, whether the Audit API imposes a maximum lookback or span on StartDate/EndDate, permission requirements, and any row limits — all of which materially affect correct invocation.

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 focused sentence with no filler or redundancy. It is front-loaded with the verb and resource, though it is arguably too terse given the absence of annotations and output schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations and no output schema, the description is the only place an agent can learn about return shape, constraints, and limits — and it says nothing about any of them. For an audit-retrieval tool with two required date parameters and API-specific range rules, this leaves significant gaps.

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 each of the four parameters is already documented with format examples and filter intent. The description adds no meaning beyond the schema, which is the baseline expectation when the schema does the heavy lifting.

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 (Get) and a specific resource (anonymous Apex execution audit data) plus the source API, so the agent knows exactly what will be returned in kind, if not in shape. It stops short of distinguishing itself from sibling audit tools such as get_audit_events and get_deployment_audit, which cover different audit event families.

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?

There is no guidance on when to choose this over the other audit-retrieval siblings, no mention of prerequisites, and no note about what date range is valid. The agent must infer the routing decision entirely from the tool name.

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