Skip to main content
Glama

Lint an assay payload before spending credit

assay_preflight
Read-onlyIdempotent

Use this when you want to lint the SHAPE of a submission (DSL spec, candles or trades) for free before spending a check, so a typo never costs you one. A format check only -- it gives no buy/sell advice. Free payload lint -- fix your submission BEFORE spending a check.

Validates the SHAPE of what you are about to submit, with the same machine-readable failure vocabulary the paid tools use: DSL schema validity, OHLCV sanity (finite positive prices, aligned series, strictly increasing timestamps), per-symbol data presence, trade-row types, and an honest size warning when the sample is below the paid gates' evidential floor. Send the same spec/ohlcv_by_symbol/trades you would send to assay_gauntlet or assay_signal; get back ok plus named findings (dsl_invalid, timestamps_not_monotonic, ohlcv_non_finite_or_non_positive, ohlcv_series_misaligned, symbol_data_missing, trades_rows_invalid, sample_below_engine_floor) with plain-language details. Shape lint only -- a clean preflight is NOT evidence of an edge and never blesses a signal; it just means your paid check will not bounce on format. Code-computed, no ledger write, no account needed. NOT financial advice. Price: free.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "assay_preflight"
  }
}

Input Schema

NameRequiredDescriptionDefault
specNoDSL strategy to lint for shape/DSL errors before you spend a check.
tradesNoTrade list to lint instead of a spec.
ohlcv_by_symbolNoCandles per symbol to sanity-check (aligned, finite, positive).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changed
    • addedInput schema / $defs
      Added value: +{
      +  "JsonValue": {
      +    "anyOf": [
      +      {
      +        "type": "boolean"
      +      },
      +      {
      +        "maximum": 1000000000000000,
      +        "minimum": -1000000000000000,
      +        "type": "integer",
      +        "x-strictJsonInteger": true
      +      },
      +      {
      +        "maximum": 1000000000000000,
      +        "minimum": -1000000000000000,
      +        "type": "number"
      +      },
      +      {
      +        "maxLength": 262144,
      +        "type": "string",
      +        "x-maxUtf8Bytes": 262144
      +      },
      +      {
      +        "items": {
      +          "$ref": "#/$defs/JsonValue"
      +        },
      +        "maxItems": 10000,
      +        "type": "array"
      +      },
      +      {
      +        "additionalProperties": {
      +          "$ref": "#/$defs/JsonValue"
      +        },
      +        "maxProperties": 256,
      +        "propertyNames": {
      +          "maxLength": 256,
      +          "x-maxUtf8Bytes": 256
      +        },
      +        "type": "object"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "x-maxDepth": 16,
      +    "x-maxNodes": 10000
      +  }
      +}
    • removedInput schema / properties / ohlcv_by_symbol / additionalProperties
      Removed value: -true
    • addedInput schema / properties / ohlcv_by_symbol / anyOf
      Added value: +[
      +  {
      +    "additionalProperties": false,
      +    "maxProperties": 50,
      +    "patternProperties": {
      +      "^\\S+$": {
      +        "$ref": "#/$defs/JsonValue"
      +      }
      +    },
      +    "propertyNames": {
      +      "maxLength": 64,
      +      "minLength": 1
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / ohlcv_by_symbol / title
      Removed value: -"Ohlcv By Symbol"
    • removedInput schema / properties / ohlcv_by_symbol / type
      Removed value: -"object"
    • addedInput schema / properties / spec / $ref
      Added value: +"#/$defs/JsonValue"
    • removedInput schema / properties / spec / additionalProperties
      Removed value: -true
    • removedInput schema / properties / spec / title
      Removed value: -"Spec"
    • removedInput schema / properties / spec / type
      Removed value: -"object"
    • addedInput schema / properties / trades / anyOf
      Added value: +[
      +  {
      +    "items": {
      +      "$ref": "#/$defs/JsonValue"
      +    },
      +    "maxItems": 10000,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / trades / items
      Removed value: -{}
    • removedInput schema / properties / trades / title
      Removed value: -"Trades"
    • removedInput schema / properties / trades / type
      Removed value: -"array"
    • removedInput schema / title
      Removed value: -"assay_preflightArguments"
    • addedInput schema / x-maxBodyBytes
      Added value: +5242880
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "PreflightChecked": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "ohlcv_symbols": {
      +          "items": {
      +            "maxLength": 2000,
      +            "type": "string"
      +          },
      +          "maxItems": 10000,
      +          "type": "array"
      +        },
      +        "spec": {
      +          "type": "boolean"
      +        },
      +        "trades_rows": {
      +          "maximum": 9223372036854776000,
      +          "minimum": 0,
      +          "type": "integer",
      +          "x-strictJsonInteger": true
      +        }
      +      },
      +      "required": [
      +        "spec",
      +        "ohlcv_symbols",
      +        "trades_rows"
      +      ],
      +      "type": "object"
      +    },
      +    "PreflightFinding": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "code": {
      +          "enum": [
      +            "dsl_invalid",
      +            "timestamps_not_monotonic",
      +            "ohlcv_non_finite_or_non_positive",
      +            "ohlcv_series_misaligned",
      +            "symbol_data_missing",
      +            "trades_rows_invalid",
      +            "sample_below_engine_floor"
      +          ],
      +          "type": "string"
      +        },
      +        "detail": {
      +          "maxLength": 2000,
      +          "type": "string"
      +        },
      +        "level": {
      +          "enum": [
      +            "error",
      +            "warn"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "code",
      +        "level",
      +        "detail"
      +      ],
      +      "type": "object"
      +    },
      +    "PublicMeta": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "api_version": {
      +          "maxLength": 256,
      +          "minLength": 1,
      +          "pattern": "^\\S+$",
      +          "type": "string"
      +        },
      +        "as_of": {
      +          "format": "date-time",
      +          "maxLength": 20,
      +          "minLength": 20,
      +          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
      +          "type": "string"
      +        },
      +        "disclaimer": {
      +          "maxLength": 2000,
      +          "type": "string"
      +        },
      +        "engine_version": {
      +          "maxLength": 256,
      +          "minLength": 1,
      +          "pattern": "^\\S+$",
      +          "type": "string"
      +        },
      +        "input_digest": {
      +          "pattern": "^sha256:[0-9a-f]{64}$",
      +          "type": "string"
      +        },
      +        "not_financial_advice": {
      +          "const": true,
      +          "type": "boolean"
      +        },
      +        "operation": {
      +          "maxLength": 256,
      +          "minLength": 1,
      +          "pattern": "^\\S+$",
      +          "type": "string"
      +        },
      +        "request_digest": {
      +          "pattern": "^sha256:[0-9a-f]{64}$",
      +          "type": "string"
      +        },
      +        "request_id": {
      +          "anyOf": [
      +            {
      +              "maxLength": 256,
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "source_identity_digest": {
      +          "pattern": "^sha256:[0-9a-f]{64}$",
      +          "type": "string"
      +        },
      +        "statefulness": {
      +          "enum": [
      +            "pure",
      +            "public_read",
      +            "tenant_read",
      +            "tenant_write"
      +          ],
      +          "type": "string"
      +        },
      +        "tenant_scope": {
      +          "maxLength": 256,
      +          "minLength": 1,
      +          "pattern": "^\\S+$",
      +          "type": "string"
      +        },
      +        "tenant_scope_version": {
      +          "maxLength": 256,
      +          "minLength": 1,
      +          "pattern": "^\\S+$",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "engine_version",
      +        "api_version",
      +        "as_of",
      +        "input_digest",
      +        "request_digest",
      +        "tenant_scope",
      +        "tenant_scope_version",
      +        "request_id",
      +        "source_identity_digest",
      +        "operation",
      +        "statefulness",
      +        "not_financial_advice",
      +        "disclaimer"
      +      ],
      +      "type": "object",
      +      "x-relations": [
      +        "as_of is a real UTC RFC3339 second"
      +      ]
      +    }
      +  },
      +  "additionalProperties": false,
      +  "properties": {
      +    "result": {
      +      "additionalProperties": false,
      +      "allOf": [
      +        {
      +          "else": {
      +            "properties": {
      +              "findings": {
      +                "contains": {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "code": {
      +                      "type": "string"
      +                    },
      +                    "detail": {
      +                      "type": "string"
      +                    },
      +                    "level": {
      +                      "const": "error"
      +                    }
      +                  },
      +                  "required": [
      +                    "level"
      +                  ],
      +                  "type": "object"
      +                }
      +              }
      +            }
      +          },
      +          "if": {
      +            "properties": {
      +              "ok": {
      +                "const": true
      +              }
      +            },
      +            "required": [
      +              "ok"
      +            ]
      +          },
      +          "then": {
      +            "properties": {
      +              "findings": {
      +                "not": {
      +                  "contains": {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "code": {
      +                        "type": "string"
      +                      },
      +                      "detail": {
      +                        "type": "string"
      +                      },
      +                      "level": {
      +                        "const": "error"
      +                      }
      +                    },
      +                    "required": [
      +                      "level"
      +                    ],
      +                    "type": "object"
      +                  }
      +                }
      +              }
      +            }
      +          }
      +        }
      +      ],
      +      "properties": {
      +        "_meta": {
      +          "$ref": "#/$defs/PublicMeta"
      +        },
      +        "checked": {
      +          "$ref": "#/$defs/PreflightChecked"
      +        },
      +        "findings": {
      +          "items": {
      +            "$ref": "#/$defs/PreflightFinding"
      +          },
      +          "maxItems": 10000,
      +          "type": "array"
      +        },
      +        "note": {
      +          "maxLength": 2000,
      +          "type": "string"
      +        },
      +        "ok": {
      +          "type": "boolean"
      +        },
      +        "price_usd": {
      +          "anyOf": [
      +            {
      +              "maximum": 1000000000000000,
      +              "minimum": 0,
      +              "type": "integer",
      +              "x-strictJsonInteger": true
      +            },
      +            {
      +              "maximum": 1000000000000000,
      +              "minimum": 0,
      +              "type": "number"
      +            }
      +          ]
      +        },
      +        "schema": {
      +          "const": "preflight.v1",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "_meta",
      +        "schema",
      +        "ok",
      +        "findings",
      +        "checked",
      +        "price_usd",
      +        "note"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "type": "object"
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / ohlcv_by_symbol / description
      Added value: +"Candles per symbol to sanity-check (aligned, finite, positive)."
    • addedInput schema / properties / spec / description
      Added value: +"DSL strategy to lint for shape/DSL errors before you spend a check."
    • addedInput schema / properties / trades / description
      Added value: +"Trade list to lint instead of a spec."
  3. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  4. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations indicate read-only, idempotent, not destructive. Description adds: free, no ledger write, no account needed, code-computed, and explicit list of validations. No contradictions; full disclosure of behavior beyond annotations.

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?

Well-structured with front-loaded purpose, but verbose with multiple paragraphs. Could be more concise without losing clarity. Still effective.

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

Completeness5/5

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

Given complexity (3 parameters, output schema exists, many siblings), the description covers all essential aspects: validations, findings vocabulary, what it does not bless, and constraints. No gaps identified.

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

Parameters4/5

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

Schema coverage is 100%, so baseline 3. Description adds extra context: specifies that the same payload format is used as paid tools (assay_gauntlet, assay_signal) and explains the validation types, which adds meaningful guidance beyond schema descriptions.

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 starts with a clear verb+resource: 'Lint an assay payload before spending credit'. It specifies the tool validates the shape of a submission (DSL spec, candles, or trades) for free, distinguishing it from paid tools like assay_gauntlet and assay_signal.

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

Usage Guidelines5/5

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

Explicitly tells when to use (before spending a check) and what it does not do (no buy/sell advice, not evidence of an edge). Contrasts with paid alternatives: 'Send the same spec/ohlcv_by_symbol/trades you would send to assay_gauntlet or assay_signal'.

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