Skip to main content
Glama

Algo Trade Analytics

analyze_cost_sensitivity

analyze_cost_sensitivity
Read-onlyIdempotent

Measure the strategy at its actual configured costs, then test a separate imposed commission/slippage grid for the required protocolId. Include settings worse than the declared costs before claiming cost robustness. maxVariants counts all executions, including the configured and zero-cost references.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputsNoOptional input overrides as a JSON-stringified object, e.g. '{"SMA Length":14}'. Keys are Pine input names; values are number, string, or boolean.
sourceYes
symbolYes
costBpsNo
endDateYes
startDateYes
timeframeYes
protocolIdYesExperiment protocol id returned by define_experiment_protocol for this exact cost-sensitivity check.
caseStudyIdNoOptional: bind this call to one of your case studies. Defaults to the bound run's case study.
maxVariantsNo
researchRunIdNoOptional: bind this call to one of your existing research runs. Defaults to this session's most recent unfinished run.
slippageTicksNo
mcpIdempotencyKeyNoUnique key for this logical action. Reuse it only when retrying the same arguments. Required for hosted trust-creating actions when no idempotency header is supplied.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds genuinely useful behavioral context beyond annotations: maxVariants counts all executions including configured and zero-cost references, and worse-than-declared settings must be included. No contradiction with annotations.

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?

Three dense sentences with no filler. The core action is front-loaded, the robustness requirement is stated, and the critical maxVariants caveat is placed at the end. Every sentence earns its place.

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

Completeness2/5

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

This is a complex tool with 13 parameters, only 38% schema description coverage, and no output schema. The description highlights key nuances but omits essential operational details: how the grid is constructed, how results are returned, what defaults apply, and how the required dates/symbol/source relate to execution. It is not complete enough for safe invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 38%, and the description does little to explain the many undocumented parameters. It clarifies maxVariants semantics and hints at costBps/slippageTicks as the imposed grid, but it does not compensate for the low schema coverage across 13 parameters, including required ones like source, timeframe, and date range.

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 uses a specific verb ('Measure ... then test') and a distinct resource ('commission/slippage grid for the required protocolId'), making the tool's purpose clear. It is clearly distinguishable from cost-adjacent siblings like analyze_parameter_robustness or stress_test_candidate.

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 provides clear context: use this tool to evaluate cost sensitivity at actual configured costs and under imposed grids before claiming cost robustness. It does not explicitly name alternatives or when-not-to-use conditions, but the context is strong enough for an agent to select this over siblings.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources