Skip to main content
Glama
localseodata

Local SEO Data

Official

ai_llm_response

Read-only

Query ChatGPT, Claude, Gemini, or Perplexity with a prompt and get the answer plus cited sources, so you can check what AI models say about a local business.

Instructions

Gets what a specific LLM says about a query. Returns response_text, the model used, sources with URLs, fan_out_queries, and web_search_used. Each source carries a position — the order it was cited, from 1, counted after duplicate pages collapse. Supports chat_gpt, claude, gemini, perplexity.

WHETHER YOU GET SOURCES depends on whether the model searched the web. perplexity searches on every call, so its sources are populated and it needs no parameters. The other three answer from training data unless you set web_search: true, and on local business questions they otherwise do not search at all.

WEB SEARCH SUPPORT DIFFERS BY PLATFORM. claude takes web_search, force_web_search, search_country and search_city — the full set. chat_gpt takes all four except that GPT-5 models drop force_web_search. gemini takes web_search only: a search can be permitted but never compelled, and it cannot be geographically scoped. perplexity takes search_country only and cannot be switched off. Asking for something a platform does not support returns a 400 saying what it does support.

COST: 8 credits, or 20/40 if model pins a premium/frontier model. With web_search: true it is priced from the measured cost of searching — 24 for chat_gpt, 27 for gemini, 40 for claude. perplexity stays at 8 with search included.

ACCURACY WARNING: without web search a model may state confident, wrong facts about a local business, including that an open business has closed. When checking what a model says about a real business, use a platform that searches: perplexity, or any platform with web_search: true.

MATCHING CITATIONS ON GEMINI: domain is the registrable domain and never the subdomain, because Google's grounding data does not transmit one — a client at orangecounty.example.com is reported as example.com. Match on the registrable domain for subdomain-hosted sites. The other three platforms return the full hostname.

Sampling settings are left at each platform's defaults, which differ and are not all low, so repeating a prompt returns different wording — treat one run as a sample, not a fixed answer.

May take 15-60 seconds; with web_search: true, expect the upper end.

Input Schema

NameRequiredDescriptionDefault
freshNoBypass the hour of caching and run the query again. Use when sampling the same prompt repeatedly to measure how the answer varies — a cached hit would return the earlier run and hide the variance. Always billed at the normal price, since there is no cache hit to be free.
modelNoOptional model name (e.g. gpt-5.4-mini, claude-sonnet-5, claude-opus-5, gemini-3.8-flash, sonar). Defaults to the newest standard-tier model for each platform at 8 credits. Pinning changes the cost: standard 8 credits, premium (Opus-class) 20, frontier (Fable-class) 40; an unrecognised model bills at the frontier rate. An unsupported value returns a 400 listing what the platform accepts.
promptYesPrompt to send to the LLM (e.g. "What is the best plumber in Portland?"). Max 500 characters.
platformYesWhich LLM to query
web_searchNoLet the model search the web before answering, so it can cite sources. Strongly recommended when asking about a real business — without it models answer from training data and can assert an open business has closed. Not accepted on perplexity, which always searches. Raises the price to the measured cost of searching: 24 credits chat_gpt, 27 gemini, 40 claude.
search_cityNoCity to search from, e.g. "Wichita". Grounds the search where the customer actually is, which is usually the point for local work. Accepted on chat_gpt and claude only.
search_countryNoISO 3166-1 alpha-2 country to search from, e.g. "US". Accepted on chat_gpt, claude and perplexity; not on gemini.
force_web_searchNoRequire the search rather than leaving it to the model's judgement. Requires web_search: true. Accepted on claude, and on chat_gpt only for non-GPT-5 models. Not available on gemini or perplexity. In testing it changed which sources were retrieved more than what the answer said, so reach for it when you need a search guaranteed, not for better answers.

Output Schema

NameRequiredDescriptionDefault
modelYes
promptYes
sourcesYes
platformYes
response_textYes
fan_out_queriesYes
web_search_usedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv1.1.0
    • addedInput schema / properties / force_web_search
      Added value: +{
      +  "description": "Require the search rather than leaving it to the model's judgement. Requires web_search: true. Accepted on claude, and on chat_gpt only for non-GPT-5 models. Not available on gemini or perplexity. In testing it changed which sources were retrieved more than what the answer said, so reach for it when you need a search guaranteed, not for better answers.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / fresh
      Added value: +{
      +  "description": "Bypass the hour of caching and run the query again. Use when sampling the same prompt repeatedly to measure how the answer varies — a cached hit would return the earlier run and hide the variance. Always billed at the normal price, since there is no cache hit to be free.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / model / description
      Previous value: -"Optional model name (e.g. gpt-4o, claude-sonnet-4-20250514, gemini-2.5-flash, sonar). Defaults to latest for each platform."New value: +"Optional model name (e.g. gpt-5.4-mini, claude-sonnet-5, claude-opus-5, gemini-3.8-flash, sonar). Defaults to the newest standard-tier model for each platform at 8 credits. Pinning changes the cost: standard 8 credits, premium (Opus-class) 20, frontier (Fable-class) 40; an unrecognised model bills at the frontier rate. An unsupported value returns a 400 listing what the platform accepts."
    • addedInput schema / properties / search_city
      Added value: +{
      +  "description": "City to search from, e.g. \"Wichita\". Grounds the search where the customer actually is, which is usually the point for local work. Accepted on chat_gpt and claude only.",
      +  "maxLength": 100,
      +  "type": "string"
      +}
    • addedInput schema / properties / search_country
      Added value: +{
      +  "description": "ISO 3166-1 alpha-2 country to search from, e.g. \"US\". Accepted on chat_gpt, claude and perplexity; not on gemini.",
      +  "maxLength": 2,
      +  "minLength": 2,
      +  "type": "string"
      +}
    • addedInput schema / properties / web_search
      Added value: +{
      +  "description": "Let the model search the web before answering, so it can cite sources. Strongly recommended when asking about a real business — without it models answer from training data and can assert an open business has closed. Not accepted on perplexity, which always searches. Raises the price to the measured cost of searching: 24 credits chat_gpt, 27 gemini, 40 claude.",
      +  "type": "boolean"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {
      +    "fan_out_queries": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "model": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "platform": {
      +      "type": "string"
      +    },
      +    "prompt": {
      +      "type": "string"
      +    },
      +    "response_text": {
      +      "type": "string"
      +    },
      +    "sources": {
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "domain": {
      +            "type": "string"
      +          },
      +          "position": {
      +            "type": "number"
      +          },
      +          "title": {
      +            "type": "string"
      +          },
      +          "url": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "url",
      +          "title",
      +          "domain"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "web_search_used": {
      +      "default": false,
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "platform",
      +    "prompt",
      +    "response_text",
      +    "model",
      +    "sources",
      +    "fan_out_queries"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/openWorld annotations: exact credit costs including premium/frontier model pinning and search-priced tiers, 15-60s latency, one-hour caching with the fresh escape hatch, per-platform 400 failures, and the Gemini registrable-domain collapse that changes how citations must be matched. The sampling-variance warning ('treat one run as a sample') is precisely the kind of non-obvious behavior an agent cannot infer from structure.

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?

Front-loaded with purpose and output shape, then clearly demarcated by capitalized headers (COST, ACCURACY WARNING, MATCHING CITATIONS), so an agent can skim to the section it needs. It is long, and a few facts (web_search pricing, force_web_search platform limits) repeat what the schema already states, which is wasted weight rather than harmful.

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?

An output schema exists, so return values need no prose, and the description still supplies everything else an agent needs to call correctly: which platforms compel vs permit search, cost tradeoffs, latency expectation, nondeterminism, and the citation-matching caveat. Nothing material is left for the caller to discover by trial and error.

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

Parameters4/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; the description earns above that by stating the platform-by-platform support matrix as a coherent rule (claude gets the full set, GPT-5 drops force_web_search, gemini is web_search-only and un-geocodable, perplexity is search_country-only) and the dependency that force_web_search requires web_search: true. Some of this duplicates the per-parameter schema text, keeping it out of the 5 band.

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?

Opens with a specific verb+resource ('Gets what a specific LLM says about a query') and immediately enumerates the return payload and supported platforms, so the agent knows exactly what the tool does and which models it can address. It is distinguishable from the surrounding ai_* siblings by being the raw per-platform query tool rather than an aggregate/visibility metric.

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?

Gives explicit conditional guidance: perplexity always searches and needs no parameters, the other three need web_search: true for local business questions, and the accuracy warning directs the agent to a searching platform when checking a real business. It stops short of naming sibling tools (ai_overview, ai_mode, ai_sample) as alternatives, so the routing against the rest of the family is left implicit.

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