Skip to main content
Glama

samply focus functions

samply_focus_functions
Read-onlyIdempotent

Identify sample contexts around a target function or namespace with the highest sample counts, counting each sample once by its deepest matching frame.

Instructions

Find the hottest sample contexts around a target function or namespace. Each matching sample is counted once using its deepest matching frame.

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": {
      "query": "<query>"
    },
    "name": "samply_focus_functions"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesCase-insensitive function / namespace substring to focus on.
threadNoOptional thread index or name filter.
afterDepthNoHow many descendant frames to include after the match.
maxMatchesNoMaximum number of matching functions to return.
maxThreadsNoMaximum number of matching threads to return.
beforeDepthNoHow many ancestor frames to include before the match.
maxContextsNoMaximum number of caller/callee/context entries to return.
profilePathNoPath to a profile JSON or JSON.GZ file.
resourceQueryNoOptional case-insensitive resource / library name filter.

Output Schema

NameRequiredDescriptionDefault
queryYes
matchesYes
threadsYes
topCalleesYes
topCallersYes
profilePathYes
sidecarPathYes
topContextsYes
resourceQueryYes
presymbolicatedYes
totalMatchedSamplesYes
matchedFunctionCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so safety needs no restating. The description adds genuine non-obvious semantics: 'Each matching sample is counted once using its deepest matching frame,' which explains the deduplication/attribution rule that determines the reported counts. It stops short of describing ordering or output shape, but the output schema covers returns.

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 short sentences, front-loaded with the core purpose and followed by the one behavioral rule that matters. There is no filler, hedging, or repetition of schema content.

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

Completeness3/5

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

The output schema covers return values and the schema covers all parameters, so the description does not need to. Still, for a nine-parameter analytical tool it says nothing about profile selection (profilePath is optional, implying a default profile context) or how results are ranked, leaving gaps an agent may need to discover by trial.

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 every one of the nine parameters is already documented in the schema, making 3 the baseline. The phrase 'around a target function' loosely motivates beforeDepth/afterDepth, and 'deepest matching frame' clarifies match attribution, but no parameter is given meaning beyond what the schema already states.

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?

The description gives a specific verb and resource: 'Find the hottest sample contexts around a target function or namespace.' The word 'hottest' signals this is a ranked hot-path analysis rather than a plain symbol lookup, which distinguishes it in spirit from a search tool. However, it never names a sibling such as samply_search_functions, so the differentiation is implicit rather than stated.

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?

Usage is only implied: an agent can infer this is for examining callers/callees around a known function when investigating hot paths. There is no explicit when-to-use, no when-not-to-use, and no pointer to an alternative tool for related questions. Nothing is misleading, but the routing decision is left to inference.

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