Skip to main content
Glama
vola-trebla

v8-cpu-profile-decoder-mcp

by vola-trebla

extract_hottest_functions

Parses a V8 .cpuprofile file and returns the top functions by exclusive CPU time, filtering out internals and collapsing framework frames to identify user-code hotspots.

Instructions

Parses a V8 .cpuprofile file and returns the top N functions ranked by exclusive CPU time (self time). Filters out V8 internals and Node.js built-ins by default, returning only user code. Framework frames (express, next.js, koa, etc.) can be collapsed into a single entry. Recursive calls to the same source location are merged with an instanceCount field. Use this first to identify which functions are consuming the most CPU in a Node.js performance profile.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_nNoNumber of hottest functions to return (default: 10)
profile_pathYesAbsolute path to the .cpuprofile file
min_self_percentNoMinimum self time percentage to include a function (default: 0.5%)
collapse_recursionNoMerge multiple nodes with the same source location (functionName + url + line + column) into one entry. instanceCount shows how many recursive instances were merged (default: true)
collapse_frameworksNoCollapse all frames from known frameworks (express, next.js, koa, fastify, nestjs, react, vue, nuxt, hapi) into a single "<framework> internals>" entry per framework. Prevents dozens of small framework entries from diluting the top-N list (default: true)
include_node_internalsNoInclude V8 internals and Node.js built-ins in results (default: false)
Behavior4/5

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

Since no annotations are provided, the description carries the full burden of disclosing behavior. It reveals key defaults: filtering out V8 internals/Node.js built-ins, collapsing framework frames, and merging recursive calls with an instanceCount. These details go beyond the parameter schema by explaining the tool's processing behavior, though it does not mention error handling or output structure, preventing a 5.

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 three sentences long and front-loads the core purpose in the first sentence. Each subsequent sentence adds relevant behavioral details without unnecessary verbosity. It is concise, well-structured, and every sentence earns its place.

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?

Given the tool's moderate complexity (6 parameters, no output schema, no annotations), the description covers the core functionality, usage context, and key behavioral defaults. It explains the return concept (top N by exclusive time) but does not detail the exact fields of the returned objects. However, it is sufficient for an agent to understand the tool's role and initiate a call, so it earns a 4 rather than a 3.

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 the baseline is 3. The description adds some context (e.g., 'exclusive CPU time (self time)' and 'instanceCount field') but does not significantly enhance the parameter meanings already provided in the schema. The parameter descriptions are already detailed, so the description offers marginal added value.

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 clearly states the tool's action ('Parses a V8 .cpuprofile file') and its primary output ('returns the top N functions ranked by exclusive CPU time'), using specific verbs and resource. It distinguishes itself from sibling tools by focusing on hottest functions via self-time, which is unique among the listed alternatives. The phrase 'Use this first' further clarifies its role in the analysis workflow.

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 explicit context on when to use the tool: 'Use this first to identify which functions are consuming the most CPU in a Node.js performance profile.' This indicates it is a starting point, but it does not explicitly mention when not to use it or name alternative tools. It therefore qualifies as clear context without exclusionary guidance, matching a 4.

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