Skip to main content
Glama

BRAINIAC Technical Analysis Indicators

Compute MACD with signal line and crossovers

technical-analysis_macd
Read-onlyIdempotent

Compute the MACD line, signal line and histogram on caller-supplied closes and list the bars where the histogram changes sign. Price $0.02 USDC. POST /api/v1/technical-analysis/macd. An unpaid call returns the x402 payment terms and does not run.

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": {
      "bars": "<bars>"
    },
    "name": "technical-analysis_macd"
  }
}

Input Schema

NameRequiredDescriptionDefault
barsYesbars, array. Required.
fastNofast, integer, from 1 to 20000. Required.
slowNoslow, integer, from 1 to 20000. Required.
signalNosignal, integer, from 1 to 20000. Required.

Output Schema

NameRequiredDescriptionDefault
macdNomacd. Array.
paramsNoparams. Object.
signalNosignal. Array.
warmupNowarmup. Object.
sourcesNosources. Array.
histogramNohistogram. Array.
crossoversNocrossovers. Array.
limitationsNolimitations. Array.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and open-world, so the safety profile is covered. The description adds genuinely non-obvious behavior: a $0.02 USDC charge, the POST endpoint, and that an unpaid call returns x402 payment terms without executing — that last point materially changes agent expectations.

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 short sentences, front-loaded with what is computed, followed by cost and the unpaid-call caveat. No filler or repetition of the title.

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 paid, read-only analytics endpoint with a full output schema and fully documented parameters, the description covers purpose, cost, transport, and the failure mode of an unpaid call. A minor gap is that it does not state any minimum-bars requirement for a valid MACD result, which the schema does not enforce either.

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% and includes defaults (12/26/9) and bounds, so the schema does the heavy lifting. The description says computation runs on 'caller-supplied closes' but adds no meaning about fast/slow/signal periods beyond what the schema already declares, 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 and resource: computing the MACD line, signal line, and histogram, plus an extra output (bars where the histogram changes sign). The specificity (MACD rather than generic 'trend indicators') lets an agent distinguish it from siblings like technical-analysis_moving-averages or momentum-oscillators without opening the schema.

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 by the computation named; there is no guidance on when to pick MACD over the sibling momentum-oscillators or trend-indicators tools, nor on input prerequisites such as minimum bar count. The payment and unpaid-call notes are useful preconditions but not selection guidance.

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