Skip to main content
Glama

Run a study (spends credits)

run_study
Destructive

Actually ask the audience. THIS SPENDS THE WORKSPACE'S CREDITS and cannot be undone.

Returns run_id, study_id and web_url; the result arrives through get_study(run_id). Credits are debited as the study executes, and the estimate is claimed against the workspace's daily agent budget at submission. Call estimate_study first unless the study is small, and ask the user before submitting anything with confirm_recommended=true. Poll get_study every 5 to 10 seconds, and no faster than once per 10 seconds per study when several are in flight: the key allows 30 calls a minute in total.

kind: pick by what respondents are shown, and pass ONLY that kind's material; another kind's field is refused (kind_mismatch) rather than ignored. closed_question a question with 2-8 answer options (add 'Not sure' if they are not exhaustive) open_question answered in their own words, coded into themes preference_test choose between 2-12 written options, with reasons (the web app's creative test for copy or concepts) image_reaction react to 1-3 images (the web app's creative test for pictures). Respondents see the pixels, so pass the image itself, never your description of it: host attachments as image_files first; else request_upload, send the file, then image_refs; a public address as image_urls. Never invent a download_url or file_id. A rough sketch of an IDEA may instead be described in words in an open_question or preference_test with material_is_description=true. url_feedback a page test: first impression, three ratings, then your question survey / guide a questionnaire (survey) or interview guide (guide): pass instrument_id from the web app's library, or transcribe the user's document into questions in order and tell them skip logic, grids and pictures do not carry over focus_group a moderated discussion over topics, 3 to 8 seats society a PR test: stimulus (an announcement, policy or message, verbatim) spreads through the audience over days simulated days on platform (weibo | xiaohongshu | x | reddit | internal). People see it through their feed, post, reply, repost and privately change their minds only on arguments they read. events places later facts on the timeline ("day 3: the company apologises"). variants adds up to 4 other versions of the announcement and ranks every version by how it moves opinion against saying nothing. Returns reach and fermentation by day, private vs public stance, the arguments that emerged, who moved whom. Compares scenarios for one audience; never a forecast of the real platform. audience_ids: from list_audiences. respondents: per audience; the default is 50, or the kind's smaller size (url_feedback 30, focus_group 8, society 100). Ask for more only when the user wants more, and stay inside what today's workspace budget still covers. respondents_by_audience overrides per id. study_id: an earlier study's id, to ask the SAME respondents a follow-up (the whole panel answers again with their earlier answers in front of them; there is no per-option targeting). notes: the research goal, verbatim, for the report.

Input Schema

TableJSON 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
notesNoThe user's research goal or context, verbatim
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
study_idNoFollow-up: the study_id of an earlier run_study, to ask the same respondents again
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?}; leave options out for an open question
image_refsNoimage_reaction only: refs from request_upload, once the image 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)
wait_secondsNoBlock up to this long for a small study to finish and return its result inline (max 45)
instrument_idNosurvey / guide only: the saved instrument's id
idempotency_keyNoYour own token for this submission; a retry with the same token returns the existing study instead of running it twice
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

TableJSON 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
errorNoError code, when ok is false
run_idNoPoll get_study with this
statusNo
web_urlNoThe study in the iMario web app
replayedNotrue: the idempotency_key matched an earlier submission
study_idNoPass to run_study for a follow-up with the same respondents
respondentsNo
estimated_creditsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. Changed45 schema fields changed
    • removedInput schema / properties / idempotency_key / anyOf
      Removed value: -[
      -  {
      -    "maxLength": 120,
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / idempotency_key / default
      Removed value: -null
    • addedInput schema / properties / idempotency_key / maxLength
      Added value: +120
    • addedInput schema / properties / idempotency_key / type
      Added value: +"string"
    • 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 / study_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / study_id / default
      Removed value: -null
    • addedInput schema / properties / study_id / type
      Added value: +"string"
    • 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"
  3. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructive=true and non-idempotent, but the description adds the details that matter: credits are debited during execution and the estimate is claimed against the daily budget at submission, the action cannot be undone, there is a 30-call/minute key-wide rate limit, and the idempotency_key retry semantics. It also discloses a behavioral failure mode (kind_mismatch) that 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?

The critical credit warning and the routing pointer to get_study/estimate_study are front-loaded, and the per-kind block is table-like and scannable. It is long, but for 23 parameters and 9 kinds nearly every line carries a non-redundant constraint; only minor trimming (e.g. the opening aside) would be possible.

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?

Despite an output schema existing, the description notes that run_id, study_id and web_url come back and that the result arrives via get_study, removing any ambiguity about async delivery. Combined with per-kind field requirements, budget/credit rules and polling cadence, an agent has everything needed to invoke this correctly.

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

Parameters5/5

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

Schema coverage is 100%, so the baseline is 3, but the description materially exceeds it: per-kind defaults (50, or url_feedback 30, focus_group 8, society 100), the rule that only one kind's material may be passed, the image sourcing preference order (image_files > request_upload/image_refs > image_urls), and the warning never to invent download_url or file_id. These are semantic constraints absent from the schema.

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 action ('ask the audience' / submit a study) with explicit consequence framing, and clearly distinguishes itself from siblings by naming estimate_study and get_study as the alternatives. The credit-spend warning immediately separates it from estimate_study, so an agent can route without opening a 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?

Gives explicit when-to-use rules: call estimate_study first unless the study is small, ask the user before submitting anything with confirm_recommended=true, poll get_study every 5-10 seconds and no faster than once per 10 seconds. It also states when to use study_id (follow-up on the same respondents) and how to pick a kind by what respondents are shown.

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