Skip to main content
Glama

Query metrics over AI answers

query_metrics
Read-onlyIdempotent

Measure which brands AI names or recommends across topics, markets, or engines. Public measures: answers, questions, share_named, share_recommended, listing_share, concentration, share_citing, page_type_mix, hedge_mix, own_site_citations, descriptor_words, causal_funnel (concentration takes no by). Rows include answer and question counts. Shares include a 95% range when available. For cited pages use search_cited_pages. Free. More arguments: resolve_ids {"kinds":["argument"],"q":["query_metrics"]}.

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

Input Schema

NameRequiredDescriptionDefault
byNoup to 3 of brand, topic, market, question, engine, surface_class, place, country, day, week, month, site, page, page_type, search_query, descriptor, claim, axis, versus_brand, or facet:<key>
sortNoa measure or a by dimension; "<name> asc" or "<name> desc"
limitNodefault 25; the token cap wins
brandsNowith by brand: only these brands' rows, against each other in the same answers (in place of the most named)
cursorNo
filterNowhich answers count; window is a separate argument, not part of filter
windowNodefault the last 28 days; "last" or from/to
compareNoprior: the window of equal length before, with significance; none: no comparison. Write the value bare, compare: prior, with no quotes inside the string
explainNofalse: omit data.note, context.measures, and verbose cite attribution (keeps scope, caveats, dataChanges, window). change (with subject, a share and compare prior): explain move via sameQuestions vs questionMix
historyNoanswers past 90 days, $0.001 each once: auto (default) a sample worth up to a quarter of the month's budget, at most $5; all, every answer within the budget; free, none, with each sample's cost
subjectNobrd_ id the shares are about; or group by brand. With no filter it reads the brand's own markets (up to three) pooled, named in context.marketsRead: pass filter.market for one market's number
measuresNorequired: what to count
allBrandsNowith by brand: rank every brand named, not the 50 named most (signed in)
topPerGroupNowith two dimensions in by: the first N rows within each value of the first

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / explain / description
      Previous value: -"false: leave out the one-sentence note (data.note). change (with subject, a share and compare prior): why each share moved, split into the same questions and the question mix, with engine model changes"New value: +"false: omit data.note, context.measures, and verbose cite attribution (keeps scope, caveats, dataChanges, window). change (with subject, a share and compare prior): explain move via sameQuestions vs questionMix"
  2. Changed1 schema field changed
    • changedInput schema / properties / filter / properties / scope / description
      Previous value: -"default all: public plus this workspace's own; own: only the answers this workspace bought; tracked: its own answers and those about the questions, topics and brands it watches with the track tool (not the brands it added in the app); public: public answers only; index: the answers parse.gl's public pages count, which a logged-out call always reads"New value: +"default all: public plus this workspace's own; own: only answers this workspace bought; tracked: own answers plus saved brands and track watches; public: public answers only; index: answers parse.gl's public pages count (logged-out default)"
  3. Changed1 schema field changed
    • changedInput schema / properties / by / description
      Previous value: -"up to 3 of brand, topic, market, question, engine, surface_class, place, country, day, week, month, site, page, page_type, axis, versus_brand, or facet:<key>"New value: +"up to 3 of brand, topic, market, question, engine, surface_class, place, country, day, week, month, site, page, page_type, search_query, descriptor, claim, axis, versus_brand, or facet:<key>"
  4. Changed1 schema field changed
    • changedInput schema / properties / measures / items / enum
      Previous value: -[
      -  "answers",
      -  "questions",
      -  "share_named",
      -  "share_recommended",
      -  "share_citing",
      -  "concentration",
      -  "listing_share",
      -  "page_type_mix",
      -  "hedge_mix",
      -  "own_site_citations",
      -  "descriptor_words"
      -]New value: +[
      +  "answers",
      +  "questions",
      +  "share_named",
      +  "share_recommended",
      +  "share_citing",
      +  "concentration",
      +  "listing_share",
      +  "page_type_mix",
      +  "hedge_mix",
      +  "own_site_citations",
      +  "causal_funnel",
      +  "descriptor_words"
      +]
  5. Changed5 schema fields changed
    • addedInput schema / properties / allBrands
      Added value: +{
      +  "description": "with by brand: rank every brand named, not the 50 named most (signed in)",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / filter / properties / scope / description
      Previous value: -"default all: public plus this workspace's own; own: only the answers this workspace bought; tracked: own answers, saved brands, and items watched with track; public: public answers only"New value: +"default all: public plus this workspace's own; own: only the answers this workspace bought; tracked: its own answers and those about the questions, topics and brands it watches with the track tool (not the brands it added in the app); public: public answers only; index: the answers parse.gl's public pages count, which a logged-out call always reads"
    • changedInput schema / properties / filter / properties / scope / enum
      Previous value: -[
      -  "tracked",
      -  "public",
      -  "own",
      -  "all"
      -]New value: +[
      +  "tracked",
      +  "public",
      +  "own",
      +  "all",
      +  "index"
      +]
    • changedInput schema / properties / measures / items / enum
      Previous value: -[
      -  "answers",
      -  "questions",
      -  "share_named",
      -  "share_recommended",
      -  "concentration",
      -  "listing_share"
      -]New value: +[
      +  "answers",
      +  "questions",
      +  "share_named",
      +  "share_recommended",
      +  "share_citing",
      +  "concentration",
      +  "listing_share",
      +  "page_type_mix",
      +  "hedge_mix",
      +  "own_site_citations",
      +  "descriptor_words"
      +]
    • addedInput schema / properties / topPerGroup
      Added value: +{
      +  "description": "with two dimensions in by: the first N rows within each value of the first",
      +  "maximum": 50,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  6. Changed2 schema fields changed
    • addedInput schema / properties / filter / properties / market / description
      Added value: +"Industry or category markets. For countries use country, and for cities use place."
    • changedInput schema / properties / measures / items / enum
      Previous value: -[
      -  "answers",
      -  "share_named",
      -  "share_recommended",
      -  "concentration",
      -  "listing_share"
      -]New value: +[
      +  "answers",
      +  "questions",
      +  "share_named",
      +  "share_recommended",
      +  "concentration",
      +  "listing_share"
      +]
  7. Changed3 schema fields changed
    • changedInput schema / properties / filter / properties / brandRule / description
      Previous value: -"default named; warned: the answer advises against the brand (the facet mention.advised_against, which misses most warnings and differs from the dashboard's Answers page filter)"New value: +"default named; not_recommended keeps judged answers recommending none of the filter brands; warned filters to answers flagged with facet mention.advised_against"
    • changedInput schema / properties / filter / properties / brandRule / enum
      Previous value: -[
      -  "named",
      -  "recommended",
      -  "first",
      -  "not_named",
      -  "warned"
      -]New value: +[
      +  "named",
      +  "recommended",
      +  "first",
      +  "not_named",
      +  "not_recommended",
      +  "warned"
      +]
    • changedInput schema / properties / filter / properties / scope / description
      Previous value: -"default all: public plus this workspace's own; own: only the answers this workspace bought; tracked: its own answers and those about the questions, topics and brands it watches with the track tool (not the brands it added in the app); public: public answers only"New value: +"default all: public plus this workspace's own; own: only the answers this workspace bought; tracked: own answers, saved brands, and items watched with track; public: public answers only"
  8. Changed1 schema field changed
    • addedInput schema / properties / history
      Added value: +{
      +  "description": "answers past 90 days, $0.001 each once: auto (default) a sample worth up to a quarter of the month's budget, at most $5; all, every answer within the budget; free, none, with each sample's cost",
      +  "enum": [
      +    "auto",
      +    "all",
      +    "free"
      +  ],
      +  "type": "string"
      +}
  9. Changed13 schema fields changed
    • changedInput schema / additionalProperties
      Previous value: -falseNew value: +true
    • changedInput schema / properties / explain / description
      Previous value: -"true: one plain sentence saying what the reply shows. change (with subject, a share and compare prior): why each share moved, split into the same questions and the question mix, with engine model changes"New value: +"false: leave out the one-sentence note (data.note). change (with subject, a share and compare prior): why each share moved, split into the same questions and the question mix, with engine model changes"
    • removedInput schema / properties / fields
      Removed value: -{
      -  "description": "columns to keep in each row",
      -  "items": {
      -    "maxLength": 60,
      -    "type": "string"
      -  },
      -  "maxItems": 40,
      -  "type": "array"
      -}
    • changedInput schema / properties / filter / additionalProperties
      Previous value: -falseNew value: +true
    • removedInput schema / properties / filter / properties / facet
      Removed value: -{
      -  "additionalProperties": {
      -    "anyOf": [
      -      {
      -        "type": "string"
      -      },
      -      {
      -        "items": {
      -          "type": "string"
      -        },
      -        "maxItems": 50,
      -        "type": "array"
      -      },
      -      {
      -        "additionalProperties": false,
      -        "properties": {
      -          "gte": {
      -            "type": "number"
      -          },
      -          "lte": {
      -            "type": "number"
      -          }
      -        },
      -        "type": "object"
      -      }
      -    ]
      -  },
      -  "description": "a facet with \"filter\" in its usableIn list",
      -  "propertyNames": {
      -    "maxLength": 80,
      -    "type": "string"
      -  },
      -  "type": "object"
      -}
    • removedInput schema / properties / filter / properties / match
      Removed value: -{
      -  "description": "with several brands; default any",
      -  "enum": [
      -    "any",
      -    "all"
      -  ],
      -  "type": "string"
      -}
    • removedInput schema / properties / filter / properties / page
      Removed value: -{
      -  "description": "pg_ ids of cited pages",
      -  "items": {
      -    "maxLength": 220,
      -    "minLength": 3,
      -    "type": "string"
      -  },
      -  "maxItems": 50,
      -  "type": "array"
      -}
    • removedInput schema / properties / filter / properties / surfaceClass
      Removed value: -{
      -  "description": "classes of engines to cover; default counted",
      -  "items": {
      -    "enum": [
      -      "counted",
      -      "wider",
      -      "memory",
      -      "search",
      -      "imported"
      -    ],
      -    "type": "string"
      -  },
      -  "maxItems": 5,
      -  "type": "array"
      -}
    • removedInput schema / properties / format
      Removed value: -{
      -  "description": "compact (≈6k tokens, default) or full (≤20k)",
      -  "enum": [
      -    "compact",
      -    "full"
      -  ],
      -  "type": "string"
      -}
    • removedInput schema / properties / level
      Removed value: -{
      -  "description": "how brands count: company (default; a company and its products are one brand) or product (each brand on its own, so a product's numbers leave out its siblings)",
      -  "enum": [
      -    "company",
      -    "product"
      -  ],
      -  "type": "string"
      -}
    • changedInput schema / properties / measures / items / enum
      Previous value: -[
      -  "answers",
      -  "answers_naming",
      -  "share_named",
      -  "share_recommended",
      -  "share_first",
      -  "share_spread",
      -  "avg_position",
      -  "tone_mix",
      -  "treatment_mix",
      -  "mentions_with_objection",
      -  "citations",
      -  "citations_first",
      -  "avg_citation_rank",
      -  "pages_cited",
      -  "sites_cited",
      -  "questions_citing",
      -  "weeks_cited",
      -  "comparisons",
      -  "comparisons_won",
      -  "comparisons_lost",
      -  "search_reach",
      -  "memory_gap",
      -  "concentration",
      -  "listing_share"
      -]New value: +[
      +  "answers",
      +  "share_named",
      +  "share_recommended",
      +  "concentration",
      +  "listing_share"
      +]
    • removedInput schema / properties / nudges
      Removed value: -{
      -  "type": "boolean"
      -}
    • removedInput schema / properties / panel
      Removed value: -{
      -  "description": "changes on matched questions (default) or every question",
      -  "enum": [
      -    "matched",
      -    "all"
      -  ],
      -  "type": "string"
      -}
  10. Changed1 schema field changed
    • changedInput schema / properties / filter / properties / facet / description
      Previous value: -"any key resolve_ids with kinds: [\"facet\"] lists"New value: +"a facet with \"filter\" in its usableIn list"
  11. Changed1 schema field changed
    • changedInput schema / properties / filter / properties / brandRule / description
      Previous value: -"default named; warned: the answer advises against the brand by the caution-insight rule (warnsAgainst: the judge's advised_against at least 0.65 and the brand not only a cited source; the facet mention.advised_against). It misses most warnings (recall 0.34) and is NOT the app's Answers page rule, which reads the judged treatment warned_against (the facet mention.treatment)"New value: +"default named; warned: the answer advises against the brand (the facet mention.advised_against, which misses most warnings and differs from the dashboard's Answers page filter)"
  12. Changed5 schema fields changed
    • changedInput schema / properties / filter / properties / brandRule / description
      Previous value: -"default named; warned: the answer advises against the brand by the caution-insight rule (warnsAgainst: the judge's advised_against at least 0.65 and the brand not only a cited source; list_facets: mention.advised_against). It misses most warnings (recall 0.34) and is NOT the app's Answers page rule, which reads the judged treatment warned_against (list_facets: mention.treatment)"New value: +"default named; warned: the answer advises against the brand by the caution-insight rule (warnsAgainst: the judge's advised_against at least 0.65 and the brand not only a cited source; the facet mention.advised_against). It misses most warnings (recall 0.34) and is NOT the app's Answers page rule, which reads the judged treatment warned_against (the facet mention.treatment)"
    • changedInput schema / properties / filter / properties / engine / description
      Previous value: -"surface ids (list_facets: engine); without engine or surfaceClass, the counted engines"New value: +"surface ids (resolve_ids with kinds: [\"surface\"] lists them); without engine or surfaceClass, the counted engines"
    • changedInput schema / properties / filter / properties / facet / description
      Previous value: -"any key from list_facets"New value: +"any key resolve_ids with kinds: [\"facet\"] lists"
    • addedInput schema / properties / measures / description
      Added value: +"required: what to count"
    • removedInput schema / required
      Removed value: -[
      -  "measures"
      -]
  13. Changed5 schema fields changed
    • changedInput schema / properties / window / description
      Previous value: -"Time window; default the last 28 days. \"last\" or from/to."New value: +"default the last 28 days; \"last\" or from/to"
    • changedInput schema / properties / window / properties / from / description
      Previous value: -"YYYY-MM-DD, inclusive"New value: +"inclusive"
    • removedInput schema / properties / window / properties / from / pattern
      Removed value: -"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
    • changedInput schema / properties / window / properties / to / description
      Previous value: -"YYYY-MM-DD, inclusive"New value: +"inclusive"
    • removedInput schema / properties / window / properties / to / pattern
      Removed value: -"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
  14. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive, so the safety profile is covered. The description adds real behavioral context beyond that: 'Free', shares carry a 95% range when available, rows include answer/question counts, and the cross-parameter constraint that 'concentration takes no by'.

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 is front-loaded, followed by measures, output notes, and the sibling pointer in a logical order. It is dense but largely waste-free; the trailing 'More arguments: resolve_ids {...}' snippet is the only awkward, slightly cryptic element.

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 14-parameter tool with nested objects, 93% schema coverage, and no output schema, the description covers purpose, key measures, cost, statistical caveats, and one alternative. What it omits (full return shape) is largely carried by the rich schema.

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 93%, so the schema already documents most parameters. The description mostly restates the measures enum, though it adds one genuine cross-parameter rule (concentration takes no by) and points to resolve_ids for further argument discovery — modest value over the structured fields.

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 states a specific verb and resource — 'Measure which brands AI names or recommends' — with explicit scope across topics, markets, and engines. It also names the sibling it is not for cited pages (search_cited_pages), so an agent can distinguish it from alternatives.

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?

It gives one explicit routing rule ('For cited pages use search_cited_pages') but offers no guidance on when to choose this over search_answers, check_brand, or get_brief. Usage is otherwise implied by the measure list rather than stated as a when-to-use rule.

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