Skip to main content

Clearer API and MCP errors

ImprovementAPI, MCP & agents
  • Unknown parameters are rejected. MCP tools used to ignore a parameter they don't have, so get_analytics with range: "14d" quietly returned the default 30 days. Now the call fails with unknown_parameter, names the parameter, and lists the valid ones (from and to, in that case).
  • Adding a creator who's already tracked now says who: "@examplecreator (TikTok) is already tracked in this project as creator …", with code: already_tracked and the creator's id, over both MCP and the REST API. It used to return a bare "Already active".
  • Every MCP error has a code, such as not_found or conflict, so agents can act on it without parsing the message.
  • Unknown API paths return a JSON 404. A call to an endpoint that doesn't exist, like DELETE /api/v2/goals/{id}, used to get the website's HTML page with status 200, so it could look like it worked. It now gets 404 with code: route_not_found and a link to the OpenAPI spec.
  • get_campaign_stats takes just a campaign_id. The project comes from the campaign, so project_id is optional. The REST endpoint GET /api/v2/analytics/aggregate/campaign-leaderboard works the same way.
  • The MCP server no longer describes YouTube as supported. YouTube tracking isn't live yet.