Skip to main content
Glama

Lantern Works GPU Prices: daily GPU rental price comparison

optimize_agent_stack

Read-only

Estimate a monthly stack cost from a short description of the agent being built.

description: free text, e.g. 'scrapes 20k JS pages/month via 5 GB residential proxies, 3k search queries, summarizes with an LLM, budget $300/mo'. Parsed deterministically (keywords/regex, no LLM) into components: gpu, scraping, proxy, search, llm_api, email, hosting, database, monitoring. Optional fields override the parse: gpu_hours (GPU-hours/month), gpu_model ('H100', 'A100', 'RTX 4090'), model_size_b (billions of params; sets a minimum VRAM using FP16 x 1.2), scrape_pages, js_rendering, proxy_gb, search_queries, emails_sent, llm_api, monthly_budget_usd. Each component gets the cheapest option with a cited price among tracked providers, with calc, source_url, verified_at, referral_disclosure (set when the link is a referral link) and manual-signup notes. Components with no cited price say 'no sourced price tracked' (nothing is estimated). Totals show the math and say whether they are complete. Pulled listings are excluded. Every option has data_age_hours, degraded (> 48 h) and stale (> 7 days); GPU prices older than 168 h never rank by default (listed in the line's stale_prices); max_data_age_hours replaces that default and drops older options (excluded_too_old counts them). Same data as optimize_stack, compare_gpu_prices and the deal feed.

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": "optimize_agent_stack"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNofull
llm_apiNo
proxy_gbNo
workloadNo
gpu_hoursNo
gpu_modelNo
descriptionNo
emails_sentNo
js_renderingNo
model_size_bNo
scrape_pagesNo
search_queriesNo
max_data_age_hoursNo
monthly_budget_usdNo
exclude_manual_signupNo

Output Schema

NameRequiredDescriptionDefault
okYes
modeNo
errorNo
linesNo
receiptNo
quote_idNo
issued_atNo
quote_basisNo
referral_disclosureNoOne-line referral disclosure, present whenever the result names a provider; each provider-naming item then has tracked_url (tagged /go/ redirect).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • addedOutput schema / properties / lines / items / properties / alternatives / items / properties / availability / properties / failure_reason
      Added value: +{
      +  "enum": [
      +    "sold_out",
      +    "region",
      +    "quota",
      +    "other",
      +    null
      +  ],
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / alternatives / items / properties / availability / properties / failure_reason_detail
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / alternatives / items / properties / failure_reason
      Added value: +{
      +  "enum": [
      +    "sold_out",
      +    "region",
      +    "quota",
      +    "other",
      +    null
      +  ],
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / alternatives / items / properties / failure_reason_detail
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / choice / properties / availability / properties / failure_reason
      Added value: +{
      +  "enum": [
      +    "sold_out",
      +    "region",
      +    "quota",
      +    "other",
      +    null
      +  ],
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / choice / properties / availability / properties / failure_reason_detail
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / choice / properties / failure_reason
      Added value: +{
      +  "enum": [
      +    "sold_out",
      +    "region",
      +    "quota",
      +    "other",
      +    null
      +  ],
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / choice / properties / failure_reason_detail
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. Changed8 schema fields changed
    • addedOutput schema / properties / lines / items / properties / alternatives / items / properties / availability / properties / last_known_at
      Added value: +{
      +  "format": "date-time",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / alternatives / items / properties / availability / properties / last_known_in_stock
      Added value: +{
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / alternatives / items / properties / last_known_at
      Added value: +{
      +  "format": "date-time",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / alternatives / items / properties / last_known_in_stock
      Added value: +{
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / choice / properties / availability / properties / last_known_at
      Added value: +{
      +  "format": "date-time",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / choice / properties / availability / properties / last_known_in_stock
      Added value: +{
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / choice / properties / last_known_at
      Added value: +{
      +  "format": "date-time",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / choice / properties / last_known_in_stock
      Added value: +{
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
  3. Changed1 schema field changed
    • addedOutput schema / properties / referral_disclosure
      Added value: +{
      +  "description": "One-line referral disclosure, present whenever the result names a provider; each provider-naming item then has tracked_url (tagged /go/ redirect).",
      +  "type": "string"
      +}
  4. Changed2 schema fields changed
    • addedOutput schema / properties / lines / items / properties / gpu_count
      Added value: +{
      +  "minimum": 1,
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / receipt
      Added value: +{
      +  "required": [
      +    "receipt_version",
      +    "tool",
      +    "quote_id",
      +    "lines",
      +    "feed_revision",
      +    "receipt_sha256"
      +  ],
      +  "type": "object"
      +}
  5. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  6. Changed4 schema fields changed
    • addedOutput schema / properties / lines / items / properties / alternatives / items / properties / availability / properties / basis
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / alternatives / items / properties / availability / properties / source
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / choice / properties / availability / properties / basis
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / choice / properties / availability / properties / source
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  7. Changed7 schema fields changed
    • addedOutput schema / properties / lines / items / properties / alternatives / items / properties / availability
      Added value: +{
      +  "properties": {
      +    "checked_at": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "in_stock": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "note": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "status": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / alternatives / items / properties / availability_note
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / alternatives / items / properties / in_stock
      Added value: +{
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / availability_note
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / choice / properties / availability
      Added value: +{
      +  "properties": {
      +    "checked_at": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "in_stock": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "note": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "status": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / choice / properties / availability_note
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / lines / items / properties / choice / properties / in_stock
      Added value: +{
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
  8. Changed6 schema fields changed
    • changedOutput schema / else / required
      Previous value: -[
      -  "ok",
      -  "mode",
      -  "lines",
      -  "monthly_estimate_usd",
      -  "estimate_is_complete"
      -]New value: +[
      +  "ok",
      +  "mode",
      +  "lines",
      +  "monthly_estimate_usd",
      +  "estimate_is_complete",
      +  "quote_id",
      +  "issued_at"
      +]
    • changedOutput schema / properties / error / properties / code / enum
      Previous value: -[
      -  "invalid_argument",
      -  "invalid_cursor",
      -  "not_found",
      -  "feed_unavailable",
      -  "feed_invalid",
      -  "upstream_unavailable",
      -  "internal_error"
      -]New value: +[
      +  "invalid_argument",
      +  "invalid_cursor",
      +  "cursor_expired",
      +  "not_found",
      +  "feed_unavailable",
      +  "feed_invalid",
      +  "upstream_unavailable",
      +  "internal_error"
      +]
    • addedOutput schema / properties / issued_at
      Added value: +{
      +  "format": "date-time",
      +  "type": "string"
      +}
    • addedOutput schema / properties / lines / items / properties
      Added value: +{
      +  "alternatives": {
      +    "items": {
      +      "properties": {
      +        "rate_id": {
      +          "pattern": "^r_[0-9a-f]{12}$",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "rate_id"
      +      ],
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "type": "array"
      +  },
      +  "choice": {
      +    "properties": {
      +      "rate_id": {
      +        "pattern": "^r_[0-9a-f]{12}$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "rate_id"
      +    ],
      +    "type": [
      +      "object",
      +      "null"
      +    ]
      +  }
      +}
    • addedOutput schema / properties / quote_basis
      Added value: +{
      +  "type": "object"
      +}
    • addedOutput schema / properties / quote_id
      Added value: +{
      +  "pattern": "^q_[0-9a-f]{20}$",
      +  "type": "string"
      +}
  9. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint; the description goes much further, disclosing the deterministic keyword/regex parse (no LLM), cheapest-option-with-cited-price selection, the 'no sourced price tracked' fallback, referral disclosure, manual-signup notes, and complete/incomplete totals math. It also details freshness thresholds (degraded >48h, stale >7d, GPU older than 168h never ranking by default, max_data_age_hours exclusion counting). Remaining gap: return shape and whether results are cached, though an output schema exists.

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 core purpose is front-loaded in the first sentence, then parameter semantics, then pricing/freshness rules, which is a sensible order. But the body is a dense wall of run-on clauses mixing parse semantics, freshness policy, and provider-disclosure details, and the trailing sibling note reads as an afterthought rather than routing guidance.

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 15-param, output-schema-backed, read-only estimator, the description covers parsing behavior, override precedence, pricing methodology, data-freshness rules, and exclusion policy well. The main omissions are the undescribed mode/workload/exclude_manual_signup parameters; return values need not be explained given the output schema exists.

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 0% across 15 params, so the description must compensate; it explains most parameters (description, gpu_hours, gpu_model, model_size_b with the FP16 x 1.2 VRAM rule, scrape_pages, js_rendering, proxy_gb, search_queries, emails_sent, llm_api, monthly_budget_usd, max_data_age_hours) with useful semantics. However, three parameters (mode default 'full', workload, exclude_manual_signup) are never explained, and the override-vs-parse relationship for several fields is only implied.

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 with scope: 'Estimate a monthly stack cost from a short description of the agent being built.' It also names the sibling tools that share the same data (optimize_stack, compare_gpu_prices, deal feed), so an agent can place it in the family 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?

The description makes clear what the tool is for (cost estimation from a free-text description, with override fields) and that it shares data with siblings, but it never states when to prefer optimize_stack or compare_gpu_prices over this one, nor any when-not condition.

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.