Skip to main content
Glama

BotSpot: AI Trading, Backtests and Bots

Fetch deployment logs

get_deployment_logs
Read-onlyIdempotent

Returns CloudWatch logs from a live deployment's container. Supports time-range filtering (startTimeIso/endTimeIso), CloudWatch filter patterns (query), local multi-query diagnostics (queries), diagnosticPreset, noise suppression, and pagination (nextToken). Default limit is 500 lines, newest first. Use this to debug bot errors, check trading activity, or verify a strategy is running correctly. For failed/stalled deployments, prefer diagnosticPreset="broker_order_failure" or diagnosticPreset="runtime_failure" with contextLines=5-10 and limit near 1000 before concluding root cause. A single newest-first page or one warning line is not conclusive when nextToken is present or deprecation warnings dominate the page.

diagnosticPreset values: broker_order_failure searches broker/order rejects, permission failures, Alpaca 403/40310000, and tracebacks; runtime_failure searches crashes, imports, dependency/build failures, kills, and exceptions; startup searches startup/stream/broker initialization; orders searches order/fill/cancel/reject activity. Prefer queries for multiple explicit regex searches in one call when diagnosis needs more than one angle. A good deployment-failure call uses at least three bounded queries: errors/exceptions/tracebacks, broker/order/fill/reject/position activity, and startup/runtime/strategy lines. This avoids wasting turns on one narrow search and makes missing evidence more meaningful. The response includes perQuery match counts, totalLines, scannedLines, returnedLines, scannedStart/scannedEnd timestamps when visible, noiseSuppressedLines, truncatedQueryCount, and paginationWarning when more pages may need checking. Broad queries are capped; if truncatedQueryCount is nonzero, run a narrower follow-up query.

Pass contextLines (0-50) together with query to get grep-style output — only lines matching the pattern plus N surrounding lines on each side, -- between non-contiguous groups. When contextLines is set, the CloudWatch-side filter is suppressed and filtering runs locally on the raw fetched window so surrounding lines are preserved (CloudWatch's filterPattern strips context). query is treated as a JavaScript regex (case-insensitive), with a literal-substring fallback if the regex is invalid. The response also includes totalLines, returnedLines, and matchCount so you know how much was filtered.

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": {
      "deploymentId": "<deploymentId>"
    },
    "name": "get_deployment_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
sortNo
limitNo
queryNoCloudWatch filter pattern when contextLines is omitted. For a case-insensitive JavaScript regex such as ERROR|Exception, set contextLines (0 means matching lines only), or use queries instead.
queriesNoCase-insensitive JavaScript regex searches applied locally to the fetched log page.
nextTokenNo
endTimeIsoNo
contextLinesNoApply query locally as a regex and include this many surrounding lines. Zero returns matching lines only and still avoids CloudWatch filter syntax.
deploymentIdYes
startTimeIsoNo
suppressNoiseNo
diagnosticPresetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / contextLines / description
      Added value: +"Apply query locally as a regex and include this many surrounding lines. Zero returns matching lines only and still avoids CloudWatch filter syntax."
    • addedInput schema / properties / queries / description
      Added value: +"Case-insensitive JavaScript regex searches applied locally to the fetched log page."
    • addedInput schema / properties / query / description
      Added value: +"CloudWatch filter pattern when contextLines is omitted. For a case-insensitive JavaScript regex such as ERROR|Exception, set contextLines (0 means matching lines only), or use queries instead."
  2. Changed1 schema field changed
    • changedInput schema / properties / diagnosticPreset / enum
      Previous value: -[
      -  "broker_order_failure",
      -  "runtime_failure",
      -  "startup",
      -  "orders"
      -]New value: +[
      +  "broker_order_failure",
      +  "runtime_failure",
      +  "startup",
      +  "orders",
      +  "errors_and_warnings",
      +  "performance"
      +]
  3. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantial behavior beyond them: default limit 500, newest-first ordering, the fact that setting contextLines suppresses the CloudWatch-side filter and filters locally, regex-vs-literal-substring fallback, broad-query caps, and truncation/pagination warnings. These are exactly the non-obvious traits an agent needs to interpret partial results correctly.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The content is front-loaded and information-dense, but it sprawls across three long paragraphs and repeats itself — response fields (totalLines, returnedLines) and the local-vs-CloudWatch filtering rationale are each stated twice. A tighter version could keep all the guidance while cutting the redundancy and the duplicated response-field inventory.

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?

For an 11-parameter tool with no output schema and low schema coverage, the description supplies the missing pieces: preset semantics, filtering-mode tradeoffs, pagination caveats, and an inventory of response fields including perQuery counts and paginationWarning. An agent has enough to call this correctly and to judge whether a result is conclusive.

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?

With only 27% schema description coverage across 11 parameters, the description carries most of the semantic load and does so for the hard ones: it enumerates all six diagnosticPreset values with what each searches, explains the query vs queries vs contextLines interaction, and characterizes nextToken/limit behavior. It falls short of 5 because sort and suppressNoise are only glancingly implied ("newest first", "noise suppression") rather than defined.

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?

"Returns CloudWatch logs from a live deployment's container" gives a specific verb and resource plus the distinguishing scope (live deployment), which separates it from sibling log tools like get_backtest_logs. The following sentences enumerate the exact capabilities (time-range, filter patterns, presets, pagination) so an agent knows the tool's surface 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 Guidelines5/5

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

Explicit when-to-use cases are named (debug bot errors, check trading activity, verify a strategy is running) along with a conditional recommendation for failed/stalled deployments to prefer diagnosticPreset values with specific contextLines and limit settings. It also states an ordering rule ("before concluding root cause") and warns that a single page or one warning line is not conclusive when nextToken is present, which is genuine decision guidance rather than description filler.

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.