Skip to main content
Glama

samply search functions

samply_search_functions
Read-onlyIdempotent

Search profile data for function or library names and return per-thread sample counts for matching hotspots.

Instructions

Search for function names or library names within a profile and return per-thread sample counts for matching hotspots.

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_search_functions"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesCase-insensitive search term.
maxResultsNoMaximum number of aggregated function matches to return.
profilePathNoPath to a profile JSON or JSON.GZ file.
maxThreadsPerResultNoMaximum number of thread breakdowns per matching function.

Output Schema

NameRequiredDescriptionDefault
queryYes
matchesYes
matchCountYes
profilePathYes
sidecarPathYes
presymbolicatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered by structured data. The description adds the useful detail that results are aggregated per-thread sample counts for hotspots, but says nothing about ordering, truncation behavior when maxResults is hit, or cost of scanning large profiles.

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?

A single front-loaded sentence with no filler; the action, scope, and result are all stated before any optional detail. Every phrase carries information.

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?

With an output schema present and annotations covering safety, the description needs only to establish purpose and semantics, which it does. The remaining gap is routing guidance against the closely named sibling tool, which matters for a search-style tool in a profiling suite.

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 each of the four parameters is already documented in the schema, establishing the baseline of 3. The description only adds the framing that matching happens inside a profile and that results are thread-breakdown oriented, which maps loosely to profilePath and maxThreadsPerResult without adding new semantics.

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?

Uses a specific verb ('Search') on a specific resource ('function names or library names within a profile') and states the return shape ('per-thread sample counts for matching hotspots'). It does not, however, distinguish itself from the sibling 'samply_focus_functions', which an agent could easily confuse with a name-based search.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance and no mention of alternatives such as samply_focus_functions or samply_locate_symbols. The only contextual hint is the phrase 'within a profile', which merely restates the purpose rather than guiding selection.

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