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. One short video (MP4, MOV or WebM, up to 3 minutes) can be tested the same way: respondents watch it with its sound. A video goes by request_upload and image_refs only, not by image_urls or image_files. 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.

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": "run_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
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?, 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)
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

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. 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. 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"
  5. First observed

TDQS

A5/5.0
Behavior5/5

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

The annotations already mark the tool as destructive and open-world, but the description adds substantial behavioral context beyond them: credits are debited as the study executes, the estimate is claimed against the workspace's daily budget, and the action cannot be undone. It also discloses rate limits, polling cadence, and that mismatched kind material is refused with kind_mismatch rather than silently ignored. This is exactly the kind of operational risk and side-effect detail an agent needs before invoking a costly, non-idempotent action.

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

Conciseness5/5

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

The description is long, but its length is justified by a 23-parameter tool with nine study kinds and several destructive side effects. It is front-loaded with the credit-spend warning and return behavior, then organizes kind-specific rules and parameter guidance into compact, scannable sections. Every major sentence carries operational value, and I did not find filler that should be removed.

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?

Given the tool's complexity, the annotations, the full output schema, and the very large input schema, the description is complete enough for correct invocation. It covers spending risk, return handling via get_study, polling rate limits, kind-specific material requirements, upload paths, audience sourcing, respondent defaults, follow-up behavior, and idempotency-key semantics. No material gap remains for an agent deciding whether and how to call run_study.

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 description coverage is already 100%, so the baseline would be 3, but the description adds meaningful interpretation beyond the schema for many parameters. It explains how to choose kind by what respondents see, which material each kind accepts, how audience_ids and respondents defaults work, how study_id enables a same-panel follow-up, and what notes is for. It also clarifies material-is-description behavior and image/video upload paths, adding decision-relevant semantics rather than restating field descriptions.

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 description opens with a specific verb and resource: 'Actually ask the audience' and frames the tool as running a study that spends credits. It clearly distinguishes this action from estimate_study and get_study by stating that the estimate should come first and that results arrive later through get_study. An agent can identify the tool's core purpose 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?

The description gives explicit when-to-use guidance: call estimate_study first unless the study is small, ask the user before submitting when confirm_recommended=true, and poll get_study at 5-10 second intervals. It also names alternatives for specific tasks, such as list_audiences for audience_ids and request_upload for image or video material. The guidance covers both normal invocation and important preconditions.

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