Skip to main content
Glama
vola-trebla

v8-cpu-profile-decoder-mcp

by vola-trebla

correlate_source_code

Resolve V8 CPU profile hotspots to original TypeScript source lines using source maps, falling back to compiled JS when maps are absent.

Instructions

Maps the hottest functions in a V8 CPU profile back to their original TypeScript source locations using source map files (.js.map). Falls back to compiled JS locations if no source map is found. Use to answer: which TypeScript file and line is the bottleneck actually coming from?

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_nNoNumber of hottest functions to resolve (default: 10)
profile_pathYesAbsolute path to the .cpuprofile file
sourcemap_dirNoOverride directory to search for .map files (default: same directory as .js file)
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It openly states the fallback behavior ('Falls back to compiled JS locations if no source map is found'), which is a significant behavioral trait. It does not explicitly say the tool is read-only or describe failure modes, but the disclosed fallback adds meaningful transparency.

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?

The description is two sentences long, front-loaded with the primary action, and contains no filler. Every phrase earns its place, including the fallback detail and the example question that frames usage.

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 is reasonably complete for a tool with well-documented parameters and no output schema. It explains the input, the transformation, and the fallback, and provides an example question. It does not describe what the return value looks like, but given the absence of an output schema and the relatively simple purpose, this is a minor gap.

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 the baseline is 3. The description adds minimal parameter meaning beyond the schema—it mentions source map files (.js.map) and the fallback, which indirectly clarifies `sourcemap_dir`, but it does not elaborate on `profile_path` or `top_n` beyond what the schema already documents.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Maps') and clearly names the resource ('hottest functions in a V8 CPU profile' back to 'original TypeScript source locations'). It distinguishes itself from siblings like extract_hottest_functions by emphasizing the source-map correlation step, making its unique purpose obvious.

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

Usage Guidelines4/5

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

The description gives a clear use case ('Use to answer: which TypeScript file and line is the bottleneck actually coming from?'), which tells the agent when to use it. However, it does not explicitly mention when *not* to use it or reference alternatives, so it stops short of full exclusion guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vola-trebla/v8-cpu-profile-decoder-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server