Skip to main content
Glama
aimdb-dev

aimdb-mcp

Official

get_stage_profiling

Retrieve per-stage callback wall-clock timings for records matching a key in a running AimDB instance, highlighting the slowest stage to identify bottlenecks. Requires profiling enabled.

Instructions

Get automatic stage profiling (per-.source()/.tap()/.link() callback wall-clock timing) for records matching a key from a running AimDB instance, including the slowest stage ('bottleneck'). Requires the instance to be built with the profiling feature.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endpointNoEndpoint URL (unix://PATH, serial://DEVICE?baud=N) or a bare path. Falls back to AIMDB_CONNECT env var if omitted.
record_keyYesSubstring to match against record names/keys (e.g., 'Temperature')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the burden and discloses a genuinely non-obvious behavioral constraint: the instance must be built with the `profiling` feature, otherwise the call presumably fails. It also characterizes the payload (wall-clock timing per callback stage plus the slowest stage). It does not say what happens with no matching records or when the feature is absent, keeping it short of 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the core action and return value, with the prerequisite placed last. The heavy parenthetical is dense but every clause adds information; no filler.

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?

No output schema exists, so the description must cover return content — and it does, naming per-stage wall-clock timings and the slowest stage. The feature-gate prerequisite is a key operational detail. It is close to complete, lacking only failure/empty-result behavior.

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 both `endpoint` (fallback to AIMDB_CONNECT) and `record_key` (substring match with example) are fully documented in the schema. The description adds no format or matching semantics beyond what the schema provides, so the baseline 3 applies.

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?

States a specific verb ('Get') and resource ('automatic stage profiling') with precise scope: per-`.source()`/`.tap()`/`.link()` callback wall-clock timing for records matching a key. The phrase 'from a running AimDB instance' and the returned 'bottleneck' value make it clearly distinguishable from siblings like reset_stage_profiling or get_buffer_metrics.

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?

Provides a real precondition ('Requires the instance to be built with the `profiling` feature') and scopes usage to a running instance, which is useful context. However, it never says when to choose this over alternatives such as get_buffer_metrics or how it relates to the reset_stage_profiling sibling, so usage selection is only implied.

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