Skip to main content
Glama
souvikdu

perfonext-profiler-mcp

Read Source Context

read_source_context

Annotate a hot function's source lines with sampled tick counts to reveal exact hotspots, reading only project files and warning when context lines fall outside the window.

Instructions

Read the actual source code for a hot function and annotate each line with sampled tick counts from positionTicks. The returned window is sized to cover the function's actual hot lines, not just the area around its declaration; if any ticks still fall outside it, a warning field reports how many and suggests a larger contextLines. Only reads files within the project root.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
profileIdYesProfile ID returned by load_profile
contextLinesNoMinimum lines of padding around the function declaration and its hot lines (default: 10)
functionNameYesExact function name to look up

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.7.2

TDQS

A4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full behavioral disclosure burden. It reveals that the tool only reads files inside the project root, that the returned window is sized to cover hot lines, and that a warning field may report off-window ticks and suggest a larger contextLines. This adds meaningful behavioral detail beyond the schema.

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?

Two sentences, both information-dense and free of filler. The primary action and resource are front-loaded, followed by caveats about window sizing, warning behavior, and file-scope restrictions in a logical order.

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?

For a read-only source inspection tool with no annotations and no output schema, the description covers the core behavior, the returned window logic, the warning field, and the project-root restriction. It does not describe error handling for missing functions or the exact output shape, but these are minor given the clear purpose and well-documented parameters.

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 context around window sizing and the warning field's relationship to contextLines, but it does not materially expand on the parameter semantics already documented in the input schema.

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 states a specific verb ('Read'), resource ('actual source code for a hot function'), and outcome ('annotate each line with sampled tick counts'). It is clearly distinguishable from sibling tools such as get_hotspots, which likely lists hotspots without source context, and explain_function, which likely provides explanations rather than annotated code.

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

Usage Guidelines3/5

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

The description conveys when the tool is appropriate: when the agent needs source code annotated with tick counts for a hot function. However, it does not explicitly state when not to use it or name alternative tools that might be better suited for related but different tasks.

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

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/souvikdu/perfonext-profiler-mcp'

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