debug-log-analyzer-mcp: Instructions file for Claude Code

CLAUDE.md

debug-log-analyzer-mcp CLAUDE.md is an instructions file for Claude Code from certinia/debug-log-analyzer-mcp. It costs 3,435 tokens per session, scanned A, original, BSD-3-Clause.

A CLAUDE.md instruction file for an MCP server that analyzes Salesforce Apex debug logs. It describes the server’s tools for finding slow operations, limit risks, summaries, and anonymous Apex execution.

In plain words
What is it for?
Developing or operating the Apex log analyzer, examining performance bottlenecks and governor-limit risks, and running supported Apex analysis tools.
Why use it?
It tells coding agents how the project is organized and how to install, build, develop, and run the TypeScript server.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is certinia/debug-log-analyzer-mcp's own configuration. It tells Claude Code how to work on debug-log-analyzer-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything debug-log-analyzer-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to certinia/debug-log-analyzer-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/certinia/debug-log-analyzer-mcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/certinia/debug-log-analyzer-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for debug-log-analyzer-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/certinia/debug-log-analyzer-mcp/claude-md/github.svg)](https://agentmods.dev/instructions/certinia/debug-log-analyzer-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/certinia/debug-log-analyzer-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/certinia/debug-log-analyzer-mcp/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for debug-log-analyzer-mcp CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/certinia/debug-log-analyzer-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/certinia/debug-log-analyzer-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,435 This file is loaded in full into every session.
When invoked 3,435 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.03435 $0.03435
Opus 5.5 $0.01374 $0.01374
Sonnet 5.5 $0.00687 $0.00687
Haiku 4.5 $0.00344 $0.00344

Measured 4d ago against content hash ee01816c97b6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

debug-log-analyzer-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

An MCP server that analyses Salesforce Apex debug logs for performance bottlenecks, governor limit usage and optimization opportunities.

Development Commands

# Install dependencies
pnpm install

# Build the TypeScript project
pnpm run build

# Development with watch mode
pnpm run dev

# Run the server standalone
pnpm start

Architecture

Core Components

  • src/index.ts: the bin entry point (dist/index.js). Parses flags, calls runStdioServer, nothing else. A bad flag exits 1 with one [apex-log-mcp] line, checked by pnpm run eval.
  • src/server.ts: createApexLogServer, runStdioServer and parseServerConfig. Registers the eight tools over stdio, and takes no import side effects, so tests can import it without spawning a server.
  • src/tools/responseShaping.ts: the shared response helpers - toonResult, omitEmpty, warningField, toLimitRows, toNamespaceLimitRows, limitUnitsClause, limitGatingCategory, LIMIT_GATING_CATEGORIES, roundMs, roundPercent, percentageOf, NS_TO_MS, NAME_LIMIT, and the page every analysis table stops at - fitPage, PAGE_CHAR_BUDGET, nextOffsetField - with the matches filter they share.
  • src/tools/localFile.ts: absolutePathSchema, fileReadError, fsErrorWords and outsideRoots, shared by every tool that reads or writes a local file - a log or a file of Apex.
  • src/tools/inputSchema.ts: toolInputSchema, which wraps every tool's parameters so a parameter the tool does not have is refused, and the parameters the org tools share, worded once: targetOrgSchema, outputDirSchema and levelsByCategorySchema.
  • src/errors.ts: errorText, what a caught value says, and toolError, a tool's refusal or failure as a result.
  • src/elide.ts: elide, elideAround and elideEnd, which cut over-long text without splitting a character.
  • src/logLevels.ts: the debug log's categories and levels - DEBUG_CATEGORIES, TRACE_CATEGORIES, LOG_LEVELS, DEFAULT_TRACE_CONFIG - with the levels a call asks for, requestedLevels, and their wording, levelsClause; and declaredLevels and capturedAt, which read the levels a log's header declared. It needs no org, so the analysis tools import it; src/salesforce/debugLevels.ts writes DebugLevel records from it.
  • src/tools/logStore.ts: openLogStore, writeDebugLog and saveStoredLog - where every org tool saves a log, and never over a different one - and unwritableLogDir, which refuses a directory before a step that cannot be undone, and creates nothing.
  • src/tools/progress.ts: progressReporter, the progress notifications of a long org call, sent only to a caller that asked.
  • src/tools/analysisTool.ts: defineAnalysisTool, which states an analysis tool once - its name, title, description, own parameters and a pure run(apexLog, args) - and adds logFilePath, the read-only annotations, the load and the TOON encoding. Test a tool through run on a parsed log; tests/analysisTool.test.ts tests the shell. src/tools/analysisTools.ts lists every analysis tool, for the server and the tests.
  • src/salesforce/orgAccess.ts: OpenOrg, which a handler gets as open, is the one way an org tool reaches an org. It runs the roots, the local org, the identity deny, the connect, the type deny and, for a write, the production gate, for one call of one tool. bindOpenOrg makes it, and only src/server.ts calls bindOpenOrg.
  • src/tools/*Definition.ts: an org tool's wire definition, { name, config }; one module can hold two tools. A write tool's definition is a function of the refusal and carries it, so registerOrgTool answers a refused call before the handler loads - copy a write tool, not a read tool, for a write. A definition loads at startup and loads no Salesforce SDK; the handler loads on its first call. A new org tool touches its definition, its handler, one registerOrgTool call in src/server.ts, its suite, which wires the handler through tests/support/wiredOrgTool.ts, the tool count and handler mocks in tests/server.test.ts, and a DEFINITION_BUDGET entry in scripts/eval.mjs. pnpm run eval names anything else it lacks, and pnpm run eval:update writes its README tables.
  • src/apexLog/: the one module that imports the parser; an ESLint rule refuses it anywhere else. index.ts holds the parser's rules the tools share - textOf, countOf, ceilingOf, multipleLogsWarning, LOG_EVENT_ID, and the parser's DEFAULT_NAMESPACE, DEBUG_CATEGORY, DEBUG_CATEGORY_TOKEN, ENDED_BY, KIND, LEVEL, LIMIT_METRICS and eventType - and the readers of one event from log.columns: typeAt, frameTypeAt, namespaceAt, textAt, and totalAt for countOf(...).total; and isEventOf, which narrows an event so its details read as its type's. It also re-exports the parser types the tools read. A pass over every event reads log.columns, not event objects: the parser makes a new object on each read of an event. Each column reader takes its column, so a loop reads it from log.columns once; textAt alone takes the log. source.ts holds loadApexLog, the one way the analysis tools get a log. It caches the last parse against a stat fingerprint, shares one parse between concurrent callers, and drops it five minutes after its last use, because a parsed log holds one to two times the size of the file.
  • @apexdevtools/apex-log-parser: the parser, as a dependency - nothing here parses a log. Every value, type and const comes from the package root. Read debugCategory for an event's category, never category: that one is a UI grouping slated for deprecation. Read isFrame for whether an event has a duration.

Read the full file on GitHub · 120 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed · +153 tokens per session ee01816c97b6
  2. 7d ago Changed · +1 lines · +148 tokens per session fd6a48d43dce
  3. 9d ago Changed · +7 lines · +688 tokens per session 51635a7e618e
  4. 10d ago Changed · +33 tokens per session d873bfef229d
  5. 11d ago Changed · +35 tokens per session 44d44334cd55
  6. 17d ago Changed · +3 lines · +238 tokens per session 5f3573ec5e57
  7. 18d ago Changed · +6 lines · +293 tokens per session 028b247809e6
  8. 29d ago Changed · +3 lines · +236 tokens per session f4c6eb39969b
  9. 1mo ago Changed · +10 tokens per session 7676f2492dc8
  10. 1mo ago First seen · 100 lines · 1,601 tokens per session scan A dd2e7257d928

Subscribe to this mod's changes

debug-log-analyzer-mcp CLAUDE.md is an instructions file published in the GitHub repository certinia/debug-log-analyzer-mcp (36 stars, last pushed 2d ago), licensed BSD-3-Clause. It adds 3,435 tokens to every session, about $0.0137 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

debug-log-analyzer-mcp CLAUDE.md compared with instructions from other repositories

debug-log-analyzer-mcp CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
debug-log-analyzer-mcp CLAUDE.mdcertinia/debug-log-analyzer-mcpInstructions file362d agoBSD-3-ClauseA3,435Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode