Skip to main content
Glama

check speech preview availability

speech-previews_get-options
Read-only

Check whether a speech preview fits the free TTS allowance or will use paid credits before creating it. Confirms project access and flags billing issues that require plan or billing review.

Instructions

Preflight one speech preview before speech-previews_create: confirm you can read projectId, then read the organization's text-to-speech billing state. It returns no price, so use it to tell the user before creating whether the preview fits the free monthly allowance (freeMonthlyLimits.tts used against max, when freeMonthlyLimits is not null) or will draw on paid usage, judged from hasActiveCredits, plan and billingVersion. If freeTtsExhausted or paymentFailureCountExceededLimit is true, tell the user to check their plan or billing in Studio instead of creating. Ignore freeGenerationsExhausted and the generations and sync3 counters; they cover other generations, not speech. freeScriptLimit, when set, is the free plan's script length limit: check the script against it before creating. available is always true when the call succeeds; if the project check or billing read fails, the call returns an error and no billing fields. Not for overall balance or spend (account_get-usage) or choosing a voice (voices_list). Does not synthesize or bill.

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": {
      "projectId": "<projectId>"
    },
    "name": "speech-previews_get-options"
  }
}

Input Schema

NameRequiredDescriptionDefault
projectIdYesProject the speech preview is for, from projects_create or projects_list. Use the same id for speech-previews_create; an id you cannot access returns an error.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.34
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "$schema": "https://json-schema.org/draft/2020-12/schema",
      -    "additionalProperties": false,
      -    "properties": {
      -      "available": {
      -        "const": true,
      -        "type": "boolean"
      -      },
      -      "billingVersion": {
      -        "enum": [
      -          "v2",
      -          "v3"
      -        ],
      -        "type": "string"
      -      },
      -      "freeGenerationsExhausted": {
      -        "type": "boolean"
      -      },
      -      "freeMonthlyLimits": {
      -        "anyOf": [
      -          {
      -            "additionalProperties": false,
      -            "properties": {
      -              "generations": {
      -                "additionalProperties": false,
      -                "properties": {
      -                  "max": {
      -                    "minimum": 0,
      -                    "type": "number"
      -                  },
      -                  "used": {
      -                    "minimum": 0,
      -                    "type": "number"
      -                  }
      -                },
      -                "required": [
      -                  "used",
      -                  "max"
      -                ],
      -                "type": "object"
      -              },
      -              "sync3": {
      -                "additionalProperties": false,
      -                "properties": {
      -                  "max": {
      -                    "minimum": 0,
      -                    "type": "number"
      -                  },
      -                  "used": {
      -                    "minimum": 0,
      -                    "type": "number"
      -                  }
      -                },
      -                "required": [
      -                  "used",
      -                  "max"
      -                ],
      -                "type": "object"
      -              },
      -              "tts": {
      -                "additionalProperties": false,
      -                "properties": {
      -                  "max": {
      -                    "minimum": 0,
      -                    "type": "number"
      -                  },
      -                  "used": {
      -                    "minimum": 0,
      -                    "type": "number"
      -                  }
      -                },
      -                "required": [
      -                  "used",
      -                  "max"
      -                ],
      -                "type": "object"
      -              }
      -            },
      -            "required": [
      -              "tts"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "freeTtsExhausted": {
      -        "type": "boolean"
      -      },
      -      "hasActiveCredits": {
      -        "type": "boolean"
      -      },
      -      "paymentFailureCountExceededLimit": {
      -        "type": "boolean"
      -      },
      -      "plan": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      }
      -    },
      -    "required": [
      -      "plan",
      -      "hasActiveCredits",
      -      "freeTtsExhausted",
      -      "paymentFailureCountExceededLimit",
      -      "freeMonthlyLimits",
      -      "available"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "$schema": "https://json-schema.org/draft/2020-12/schema",
      -    "additionalProperties": false,
      -    "properties": {
      -      "error": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "code": {
      -            "type": "string"
      -          },
      -          "generationId": {
      -            "type": "string"
      -          },
      -          "importJobId": {
      -            "format": "uuid",
      -            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      -            "type": "string"
      -          },
      -          "importStatus": {
      -            "enum": [
      -              "queued",
      -              "downloading",
      -              "processing",
      -              "completed",
      -              "failed"
      -            ],
      -            "type": "string"
      -          },
      -          "message": {
      -            "type": "string"
      -          },
      -          "progress": {
      -            "maximum": 100,
      -            "minimum": 0,
      -            "type": "number"
      -          },
      -          "retryAfterMs": {
      -            "type": "number"
      -          },
      -          "retryable": {
      -            "type": "boolean"
      -          },
      -          "status": {
      -            "maximum": 9007199254740991,
      -            "minimum": -9007199254740991,
      -            "type": "integer"
      -          }
      -        },
      -        "required": [
      -          "message"
      -        ],
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "error"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "$schema": "https://json-schema.org/draft/2020-12/schema",
      +    "additionalProperties": false,
      +    "properties": {
      +      "available": {
      +        "const": true,
      +        "type": "boolean"
      +      },
      +      "billingVersion": {
      +        "enum": [
      +          "v2",
      +          "v3"
      +        ],
      +        "type": "string"
      +      },
      +      "freeGenerationsExhausted": {
      +        "type": "boolean"
      +      },
      +      "freeMonthlyLimits": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "generations": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "max": {
      +                    "minimum": 0,
      +                    "type": "number"
      +                  },
      +                  "used": {
      +                    "minimum": 0,
      +                    "type": "number"
      +                  }
      +                },
      +                "required": [
      +                  "used",
      +                  "max"
      +                ],
      +                "type": "object"
      +              },
      +              "sync3": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "max": {
      +                    "minimum": 0,
      +                    "type": "number"
      +                  },
      +                  "used": {
      +                    "minimum": 0,
      +                    "type": "number"
      +                  }
      +                },
      +                "required": [
      +                  "used",
      +                  "max"
      +                ],
      +                "type": "object"
      +              },
      +              "tts": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "max": {
      +                    "minimum": 0,
      +                    "type": "number"
      +                  },
      +                  "used": {
      +                    "minimum": 0,
      +                    "type": "number"
      +                  }
      +                },
      +                "required": [
      +                  "used",
      +                  "max"
      +                ],
      +                "type": "object"
      +              }
      +            },
      +            "required": [
      +              "tts"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "freeScriptLimit": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "lipsyncMaxSeconds": {
      +                "type": "number"
      +              },
      +              "maxCharacters": {
      +                "type": "number"
      +              },
      +              "maxSeconds": {
      +                "type": "number"
      +              },
      +              "wordsPerMinute": {
      +                "type": "number"
      +              }
      +            },
      +            "required": [
      +              "maxSeconds",
      +              "maxCharacters",
      +              "wordsPerMinute",
      +              "lipsyncMaxSeconds"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Set on the free plan without credits, null otherwise (no duration limit; every script still has the 5,000-character limit). The API estimates speech from the script at wordsPerMinute and refuses a script over maxSeconds or maxCharacters with generation_plan_duration_exceeded; a free lipsync takes at most lipsyncMaxSeconds of audio. Keep the script within these before creating, or split it into several previews."
      +      },
      +      "freeTtsExhausted": {
      +        "type": "boolean"
      +      },
      +      "hasActiveCredits": {
      +        "type": "boolean"
      +      },
      +      "paymentFailureCountExceededLimit": {
      +        "type": "boolean"
      +      },
      +      "plan": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "plan",
      +      "hasActiveCredits",
      +      "freeTtsExhausted",
      +      "paymentFailureCountExceededLimit",
      +      "freeMonthlyLimits",
      +      "available",
      +      "freeScriptLimit"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "$schema": "https://json-schema.org/draft/2020-12/schema",
      +    "additionalProperties": false,
      +    "properties": {
      +      "error": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "generationId": {
      +            "type": "string"
      +          },
      +          "importJobId": {
      +            "format": "uuid",
      +            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +            "type": "string"
      +          },
      +          "importStatus": {
      +            "enum": [
      +              "queued",
      +              "downloading",
      +              "processing",
      +              "completed",
      +              "failed"
      +            ],
      +            "type": "string"
      +          },
      +          "message": {
      +            "type": "string"
      +          },
      +          "progress": {
      +            "maximum": 100,
      +            "minimum": 0,
      +            "type": "number"
      +          },
      +          "retryAfterMs": {
      +            "type": "number"
      +          },
      +          "retryable": {
      +            "type": "boolean"
      +          },
      +          "status": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "message"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Changed1 schema field changedv0.2.4
    • changedInput schema / properties / projectId / description
      Previous value: -"Project the speech belongs to, from projects_create or projects_list."New value: +"Project the speech preview is for, from projects_create or projects_list. Use the same id for speech-previews_create; an id you cannot access returns an error."
  3. Changed1 schema field changed
    • addedInput schema / properties / projectId / description
      Added value: +"Project the speech belongs to, from projects_create or projects_list."
  4. Addedv0.1.5

TDQS

A4.6/5.0
Behavior5/5

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

Annotations declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, and nothing in the text contradicts a safe, closed read. Beyond them it discloses the failure mode (project check or billing read fails ⇒ error and no billing fields), the always-true nature of available, that no price is returned, and that no synthesis or billing occurs — all behavior the annotations cannot express.

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?

Purpose and prerequisite are front-loaded in the first clause and every sentence carries decision-relevant content, including the useful instruction to ignore freeGenerationsExhausted and the unrelated counters. It loses a point for being a single dense block with mild redundancy between "It returns no price" and the closing balance exclusion.

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 a one-parameter preflight gate this covers the decision logic (free allowance vs paid usage, script length limit), the error contract, and the escalation path to Studio. An output schema exists and the text still adds interpretation rather than restating field structure, so no gap remains.

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 coverage is 100% and the only parameter's description already explains the UUID format, its provenance (projects_create/projects_list) and the inaccessible-id error. The definition adds only the re-use hint ("Use the same id for speech-previews_create") via "confirm you can read projectId", so baseline 3 is correct.

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?

"Preflight one speech preview before speech-previews_create" states a specific verb, resource and ordering constraint, and the closing "Does not synthesize or bill" bounds what it is not. An agent can distinguish it from speech-previews_create and account_get-usage without opening any 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?

Names the exact call sequence (this before create), the branch conditions that select its advice (freeTtsExhausted, paymentFailureCountExceededLimit), and two explicit exclusions with the correct alternatives: account_get-usage for balance/spend and voices_list for voice choice. Nothing is left to inference.

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