Skip to main content
Glama

Price a study before running it

estimate_study
Read-onlyIdempotent

Ask what a study would cost, without running it. Free.

Takes exactly the study fields run_study takes (kind, audience_ids, question, the kind's material, respondents); read run_study for which material each kind needs. Returns the credits, the rule behind the number, the wallet balance, what today's agent budget still allows, default_respondents, max_respondents_under_cap (the largest panel today's remaining budget covers for this kind) and confirm_recommended (true when a person should say yes before this is spent). Do not submit when sufficient is false or blocked is set: the server will refuse it. Audiences the workspace cannot use come back under rejected with a reason; run_study refuses a submission that still names them. Pricing does not upload images or confirm that an upload was received.

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": {
      "kind": "<kind>",
      "audience_ids": "<audience_ids>"
    },
    "name": "estimate_study"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNourl_feedback only: the page
daysNosociety only: simulated days (default 5)
kindYesclosed_question | open_question | preference_test | image_reaction | url_feedback | survey | guide | focus_group | society
eventsNosociety only: later facts placed on the timeline, each {day, text}
topicsNofocus_group only: 1-12 discussion topics in order
optionsNoclosed_question / preference_test: the answer options exactly as respondents read them
platformNosociety only: weibo | xiaohongshu | x | reddit | internal (default: a generic feed)
questionNoThe exact question respondents receive, in the user's language. For focus_group/survey/guide: a one-line label
stimulusNosociety only: the announcement, policy or message people react to, verbatim
variantsNosociety only: up to 4 other versions of the announcement, verbatim; the result ranks every version by how it moves opinion against saying nothing
questionsNosurvey / guide only, instead of instrument_id: the user's questions in order, each {question, options?, multi_select?, max_select?}; leave options out for an open question; max_select is the most options one respondent may pick on a multi_select question ("pick up to 3"), omitted for no limit
image_refsNoimage_reaction only: refs from request_upload, once the image or the video has been sent
image_urlsNoimage_reaction only: 1-3 public image URLs
image_filesNoimage_reaction only: host-provided chat attachments; prefer these over another upload. Never invent download_url or file_id
respondentsNoRespondents per audience
audience_idsYesAudience ids from list_audiences (1-8)
instrument_idNosurvey / guide only: the saved instrument's id
material_is_descriptionNotrue when respondents will see YOUR description of the user's material rather than the material itself; results are labelled accordingly
respondents_by_audienceNoPer-audience override {audience_id: n}

Output Schema

NameRequiredDescriptionDefault
okNofalse means the call failed: read `error` and `hint`
hintNoWhat to change, when ok is false
kindNo
nextNoWhat to do next
noteNoSomething to tell the user or keep in mind
ruleNoThe pricing rule behind `credits`
errorNoError code, when ok is false
balanceNoThe workspace's credit balance
blockedNoThe rail that refuses it, when any
creditsNoWhat run_study would spend
rejectedNoAudiences the workspace cannot use, each with a reason
sufficientNoWhether run_study would accept this study as priced
respondentsNoRespondents per audience name
workspace_budgetNo
estimated_minutesNo
respondents_totalNo
confirm_recommendedNotrue: a person should say yes before this is spent
default_respondentsNoThe panel size used when `respondents` is omitted
credits_per_respondentNo
max_respondents_under_capNoLargest panel per audience today's remaining budget covers

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / questions / description
      Previous value: -"survey / guide only, instead of instrument_id: the user's questions in order, each {question, options?, multi_select?}; leave options out for an open question"New value: +"survey / guide only, instead of instrument_id: the user's questions in order, each {question, options?, multi_select?, max_select?}; leave options out for an open question; max_select is the most options one respondent may pick on a multi_select question (\"pick up to 3\"), omitted for no limit"
  2. Changed1 schema field changed
    • changedInput schema / properties / image_refs / description
      Previous value: -"image_reaction only: refs from request_upload, once the image has been sent"New value: +"image_reaction only: refs from request_upload, once the image or the video has been sent"
  3. Changed6 schema fields changed
    • addedInput schema / properties / days
      Added value: +{
      +  "description": "society only: simulated days (default 5)",
      +  "maximum": 14,
      +  "minimum": 1,
      +  "title": "Days",
      +  "type": "integer"
      +}
    • addedInput schema / properties / events
      Added value: +{
      +  "description": "society only: later facts placed on the timeline, each {day, text}",
      +  "items": {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  "title": "Events",
      +  "type": "array"
      +}
    • changedInput schema / properties / kind / description
      Previous value: -"closed_question | open_question | preference_test | image_reaction | url_feedback | survey | guide | focus_group"New value: +"closed_question | open_question | preference_test | image_reaction | url_feedback | survey | guide | focus_group | society"
    • addedInput schema / properties / platform
      Added value: +{
      +  "description": "society only: weibo | xiaohongshu | x | reddit | internal (default: a generic feed)",
      +  "title": "Platform",
      +  "type": "string"
      +}
    • addedInput schema / properties / stimulus
      Added value: +{
      +  "description": "society only: the announcement, policy or message people react to, verbatim",
      +  "maxLength": 6000,
      +  "title": "Stimulus",
      +  "type": "string"
      +}
    • addedInput schema / properties / variants
      Added value: +{
      +  "description": "society only: up to 4 other versions of the announcement, verbatim; the result ranks every version by how it moves opinion against saying nothing",
      +  "items": {
      +    "type": "string"
      +  },
      +  "title": "Variants",
      +  "type": "array"
      +}
  4. Changed38 schema fields changed
    • removedInput schema / properties / image_files / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "$ref": "#/$defs/ImageFile"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / image_files / default
      Removed value: -null
    • addedInput schema / properties / image_files / items
      Added value: +{
      +  "$ref": "#/$defs/ImageFile"
      +}
    • addedInput schema / properties / image_files / type
      Added value: +"array"
    • removedInput schema / properties / image_refs / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / image_refs / default
      Removed value: -null
    • addedInput schema / properties / image_refs / items
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / image_refs / type
      Added value: +"array"
    • removedInput schema / properties / image_urls / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / image_urls / default
      Removed value: -null
    • addedInput schema / properties / image_urls / items
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / image_urls / type
      Added value: +"array"
    • removedInput schema / properties / instrument_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / instrument_id / default
      Removed value: -null
    • addedInput schema / properties / instrument_id / type
      Added value: +"string"
    • removedInput schema / properties / options / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / options / default
      Removed value: -null
    • addedInput schema / properties / options / items
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / options / type
      Added value: +"array"
    • removedInput schema / properties / questions / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / questions / default
      Removed value: -null
    • addedInput schema / properties / questions / items
      Added value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
    • addedInput schema / properties / questions / type
      Added value: +"array"
    • removedInput schema / properties / respondents / anyOf
      Removed value: -[
      -  {
      -    "minimum": 1,
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / respondents / default
      Removed value: -null
    • addedInput schema / properties / respondents / minimum
      Added value: +1
    • addedInput schema / properties / respondents / type
      Added value: +"integer"
    • addedInput schema / properties / respondents_by_audience / additionalProperties
      Added value: +{
      +  "type": "integer"
      +}
    • removedInput schema / properties / respondents_by_audience / anyOf
      Removed value: -[
      -  {
      -    "additionalProperties": {
      -      "type": "integer"
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / respondents_by_audience / default
      Removed value: -null
    • addedInput schema / properties / respondents_by_audience / type
      Added value: +"object"
    • removedInput schema / properties / topics / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / topics / default
      Removed value: -null
    • addedInput schema / properties / topics / items
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / topics / type
      Added value: +"array"
    • removedInput schema / properties / url / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / url / default
      Removed value: -null
    • addedInput schema / properties / url / type
      Added value: +"string"
  5. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so safety is covered; the description still adds real value by stating the call is free, that it never uploads images or confirms an upload was received, and that the server refuses submissions with rejected audiences. That is meaningful side-effect disclosure beyond the 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?

The core purpose is front-loaded in one short sentence before the dense detail, and most sentences carry operational weight. The enumeration of return keys is somewhat redundant with the output schema, which keeps it from a 5.

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 19-parameter pricing tool with an output schema, the description covers the key decision gates (`sufficient`, `blocked`, `confirm_recommended`, `rejected`) and the cost/budget outputs an agent needs to act on the result. Listing return fields duplicates the output schema, so it is complete but not optimally lean.

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%, so the 19 parameters are already documented in structured form, which sets the baseline at 3. The description adds a useful framing that the field set mirrors run_study's and defers per-kind material details to that tool, but it does not explain any individual parameter's meaning itself.

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 opening line gives a precise verb and resource ('Ask what a study would cost, without running it') and immediately distinguishes it from run_study by the dry-run framing. An agent can tell it apart from run_study without inspecting either schema.

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

Usage Guidelines4/5

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

The description establishes when to use it (before running, to price) and points to run_study for per-kind material requirements, plus a hard guardrail: do not submit when `sufficient` is false or `blocked` is set. It lacks an explicit negative statement such as 'do not use this to actually run the study', but the intent is unmistakable.

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