Docs menu

OpenX MCP Server recipes

This page answers which tools to call, in which order, for the most common tasks.

Answer a question from a saved query

  1. get_workspace with kinds: ["WarmQueries"] to find the query that answers it.
  2. call_api with route "" to find that query's route.
  3. call_api on the route, such as "GET /warm-queries/signups-per-hour".

Check how a part is doing

  1. get_workspace to find the part's kind and lookup.
  2. get_stats with that kind and lookup, and metrics: true for numbers over time.
  3. retrieve_inventory for the same lookup when the question is where it runs or whether it drifted.

Check how a workspace's licenses are selling

  1. get_stats for the Licenses line: each license's Stripe health Status and problem codes.
  2. call_api on "GET /licenses/health" when a status is not Healthy, for the checks behind it, and on "GET /licenses/events" to see which Stripe events arrived and how many were refused.
  3. call_api on "GET /licenses/stats" for the figures and on "GET /licenses/subscribers" for who holds which plan. Each needs its own right (Licenses.Stats.Read, Licenses.Manage); a refusal names the right in MissingRights. A license that could not be read says Known: false: report "could not be read", never zero.

Propose a new data connection

  1. get_workspace with kinds: ["DataConnections"] and includeGuides: true for the guide, schema and examples.
  2. manage_proposals with checkOnly: true and the proposal. Fix each refusal by its remedy.
  3. manage_proposals without checkOnly to propose it. A person accepts it in the workspace.

Propose a Provenance policy

  1. get_workspace with kinds: ["Provenance"] and includeGuides: true for the guide, schema and examples. Provenance needs a connected cloud and a landing zone first; until then get_workspace lists it in Capabilities.InactiveKinds with what it Requires.
  2. manage_proposals with checkOnly: true and the proposal, a retention period and its basis together. Fix each refusal by its remedy.
  3. manage_proposals without checkOnly to propose it. A person accepts it in the workspace, and accepting provisions nothing: they then open Provenance and press Save configuration, which builds the storage in their Azure subscription.
  4. get_workspace with kinds: ["Provenance"] again. ProvisionedAt is set once that Save has finished.

Try a draft warm query

  1. retrieve_inventory with kinds: ["WarmQueries"], the query's lookups and includeSample: true to see the columns, the fields devices send, a Cosmos container's documents and the saved queries already trusted on the same sources. A Cosmos container is read for this (up to 25 documents, at most 5,000 RU a container), so say that to the person when the query has a Cosmos step.
  2. Write the draft from what the inventory returned.
  3. call_api on "POST /warm-queries" with the draft and CheckOnly: true to check it.
  4. The same with Compile: true to plan each step against the real data. A kql step reads no rows and answers its columns, or the engine's words if it refuses the text. A Cosmos step reads one document (at most 5,000 RU) and answers that document's field names and types, never values, with a note that a wrong Cosmos field name reads as missing.
  5. call_api on "POST /warm-queries" with the draft to run it once without saving. Read its Warnings back to the person: an output with no rows, a column empty in every row, a take with no order.
  6. manage_proposals to propose saving it, and say what you checked.

Find something in the docs

  1. browse_docs with paths: ["./"] to see the top level.
  2. browse_docs with a listed path and a query to search inside it.
  3. browse_docs with a hit's path to read the page.

On fathym.com: OpenX MCP Server →

On this page