Skip to main content
Glama

Traffic sources

list_sources
Read-onlyIdempotent

Where visitors came from, paged: search, social, AI, sites, campaign tags, direct (withheld referrers too). A visitor counts once a day, by their first page view: its utm_source/ref, else the referrer; landing_pages are those pages. internal_visitors (from the site itself) and unattributed_visitors (no page view) are not in total_visitors. No sources before sources_from. goal adds a goal's conversions to rows, hosts and tags: read goal_note. Dates are the project's calendar days, YYYY-MM-DD (timezone: get_project); timestamps are UTC. Omit from/to for the last 28 complete days, ending yesterday. Today is still in progress: a range including it reads as a drop against complete days. unique_sessions (visitors) is approximate: counted per day from a daily-rotating hash and summed over days, so a returning visitor counts once per day, and shared or changing networks merge or split people.

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

Input Schema

NameRequiredDescriptionDefault
toNoLast day, YYYY-MM-DD in the project's timezone, inclusive. Default: yesterday, the last complete day.
fromNoFirst day, YYYY-MM-DD in the project's timezone, inclusive. Default: 27 days before 'to'.
goalNoA goal's funnel ID (list_funnels, is_goal true). Adds goal numbers to every row, host and tag (conversions, conversion_rate, and revenue and revenue_per_visitor when the goal has a value), plus goal and goal_totals. Read goal_note before quoting them. Not a goal: 404.
pageNoPage number, from 1.
limitNoSources per page, 1-100. Default 50.
traitNoOnly count visitors carrying this session trait value.
searchNoCase-insensitive substring of a source's name, key or any of its referrer hosts.
projectNoProject ID, from list_projects. Required when this connection covers more than one project; may be left out when it covers one (and with an API key, which belongs to one project).
sort_byNovisitors (default); with goal also conversions, conversion_rate, revenue or revenue_per_visitor (rows without a value last).
sort_dirNodesc (default) or asc.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / goal
      Added value: +{
      +  "description": "A goal's funnel ID (list_funnels, is_goal true). Adds goal numbers to every row, host and tag (conversions, conversion_rate, and revenue and revenue_per_visitor when the goal has a value), plus goal and goal_totals. Read goal_note before quoting them. Not a goal: 404.",
      +  "type": "string"
      +}
    • addedInput schema / properties / sort_by
      Added value: +{
      +  "description": "visitors (default); with goal also conversions, conversion_rate, revenue or revenue_per_visitor (rows without a value last).",
      +  "type": "string"
      +}
    • addedInput schema / properties / sort_dir
      Added value: +{
      +  "description": "desc (default) or asc.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.1/5.0
Behavior5/5

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

The annotations already declare this is a read-only, idempotent, closed-world call, and the description layers substantial extra behavior on top: first-page-view attribution rules, exclusion of internal_visitors and unattributed_visitors from total_visitors, the sources_from cutoff, project-calendar dates versus UTC timestamps, and the warning that a range including today reads as a drop. It even discloses that unique_sessions is approximate because it sums a daily-rotating hash, which is exactly the kind of caveat an agent needs before quoting numbers.

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 in the opening clause and the paragraph stays dense without filler, but the long chain of parentheticals makes it harder to scan than a broken-out structure would be. Every sentence does carry information, so nothing is wasted.

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 10-parameter analytics query with no output schema, the description covers attribution logic, date/timezone semantics, exclusions, and the approximation caveat well enough to call the tool correctly. The remaining gap is that the shape of a returned row and pagination behavior are only implied rather than described.

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 100%, so the defaults, formats, and the goal/sort_by interactions are already documented; baseline is 3. The description reinforces the goal semantics (goal_note, goal_totals) but largely restates what the schema says, adding no new per-parameter syntax or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the resource precisely — traffic sources with the categories they cover (search, social, AI, sites, campaign tags, direct) and that results are paged. It is immediately distinguishable from get_overview or list_pages, though it never explicitly contrasts itself with nearby list_* siblings such as list_campaigns or list_funnels.

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?

Clear operational guidance: omit from/to to get the last 28 complete days, pass a goal funnel ID from list_funnels to add conversion columns, and read goal_note before quoting goal numbers. What is missing is explicit routing — when to prefer this tool over list_campaigns or run_insights_query for the same question is left to inference.

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