{
  "protocolVersion": "0.3.0",
  "name": "Setoku",
  "description": "Setoku makes an AI agent fluent in one operator's own data: a company's, a household's, or one person's. It serves their curated context (metric definitions, gotchas, which table to trust) and a governed read-only query path into the data itself, so an agent answers from how they actually count things and can publish a live view of the result on a link. Self-hosted and single-tenant: it runs on the operator's own box.",
  "version": "0.22.0",
  "provider": {
    "organization": "Hedgy Labs",
    "url": "https://setoku.com"
  },
  "documentationUrl": "https://setoku.com/docs",
  "iconUrl": "https://setoku.com/assets/setoku-mark.svg",
  "url": "https://demo.setoku.com/mcp/85315b4240ff6ded111072f950ac6f14167d920fdb765144",
  "preferredTransport": "MCP-STREAMABLE-HTTP",
  "additionalInterfaces": [
    {
      "transport": "MCP-STREAMABLE-HTTP",
      "url": "https://demo.setoku.com/mcp/85315b4240ff6ded111072f950ac6f14167d920fdb765144"
    },
    {
      "transport": "MCP-STREAMABLE-HTTP",
      "url": "https://{host}/mcp"
    }
  ],
  "transportNote": "This card describes an MCP server, not an A2A agent. `url` speaks JSON-RPC 2.0 over MCP Streamable HTTP (protocol revision 2025-06-18) and implements no A2A method: initialize an MCP session against it rather than sending A2A tasks. The URL shown is the public demo box — for a real deployment, substitute your own host.",
  "capabilities": {
    "streaming": true,
    "pushNotifications": false,
    "stateTransitionHistory": false
  },
  "defaultInputModes": [
    "application/json",
    "text/plain"
  ],
  "defaultOutputModes": [
    "application/json",
    "text/plain",
    "text/html"
  ],
  "securitySchemes": {
    "bearerToken": {
      "type": "http",
      "scheme": "bearer",
      "description": "Per-person connector token, revocable from the box's console. The public demo token above is read-only and intentionally published."
    }
  },
  "security": [
    {
      "bearerToken": []
    }
  ],
  "whenToUse": {
    "summary": "Reach for Setoku when the answer lives in data its operator connected (a company's, a household's, or one person's) and depends on their own definitions, not public knowledge.",
    "who_its_for": [
      "Companies: give agents team-by-team access to revenue, logs, and deploys, for debugging and analysis. Definitions like “active customer” get written down once.",
      "Families: shared accounts and calendars, so the partner who doesn’t write SQL gets the same answers.",
      "Just you: your own accounts and repos, queryable from your phone and the web as well as your desktop."
    ],
    "use_when": [
      "The question is about the operator's own revenue, deploys, spending, mail, or repos. The data lives in their database, Slack, GitHub, email, or bank.",
      "The data keeps changing (a bank, an inbox, an issue tracker), so an export is stale on arrival.",
      "You need the operator's definition of a term first: what counts as an active customer, which account is the joint one, which charges were reimbursed.",
      "A naive query would be wrong in a way only an insider knows: soft-deleted rows, a test tenant, a transfer between your own accounts counted as income. You want that caveat before you run SQL.",
      "You want a dashboard on a link someone else can open, on live data, not a screenshot.",
      "An agent will read untrusted text (mail, logs, chat) in the same session. That session can't rewrite what Setoku knows, so an injected instruction can't become a remembered fact.",
      "You want the answer to be auditable later: every query and knowledge change is logged on your box."
    ],
    "do_not_use_when": [
      "The question is general knowledge or public data. Setoku only knows the data its operator connected.",
      "The data is a static file on your disk. Query it locally. Setoku is for data that lives in other services and keeps changing.",
      "You need to write to the operator's database. Every data path is read-only, enforced by database role. There is no write tool and no escape hatch.",
      "You want a hosted API to sign up for. There is none. Setoku is self-hosted, and the endpoint you call is the operator's own box.",
      "You want a model to run server-side. Setoku runs no inference."
    ],
    "how_to_call": [
      "Connect to the box's MCP endpoint (Streamable HTTP) at `https://<their-box>/mcp` with the person's bearer token, or paste `https://<their-box>/mcp/<token>` into a connector dialog that has no header field.",
      "Call find_context FIRST, every time. It returns the curated notes for the question, including which tables to trust and which to avoid.",
      "Then get_schema, then run_query.",
      "If the context is wrong, call report_correction. It lands as a proposal for a human to accept. An agent session can't commit knowledge by itself."
    ]
  },
  "skills": [
    {
      "id": "setoku:compact-knowledge",
      "name": "compact-knowledge",
      "description": "Periodically tidy the Setoku knowledge store in a curator session — merge duplicate facts, resolve contradictions, tighten verbose docs, and flag stale knowledge. Use when the user asks to compact / clean up / dedupe / tidy knowledge, or when /admin/knowledge shows merge / contradiction / verbose flags.",
      "tags": [
        "setoku",
        "mcp",
        "company-data",
        "personal-data",
        "household-data",
        "compact-knowledge"
      ],
      "examples": [
        "/setoku:compact-knowledge"
      ]
    },
    {
      "id": "setoku:connect",
      "name": "connect",
      "description": "Connect a data source to Setoku end-to-end — ensure a box exists, wire the source up (read-only), verify the agent actually understands the data, and write what it learns back as knowledge. Use when the user says \"connect <source>\", \"hook up <source>\", \"add a data source\", \"set up Setoku\", or \"/setoku:connect\".",
      "tags": [
        "setoku",
        "mcp",
        "company-data",
        "personal-data",
        "household-data",
        "connect"
      ],
      "examples": [
        "/setoku:connect"
      ]
    },
    {
      "id": "setoku:curate",
      "name": "curate",
      "description": "Review pending Setoku knowledge candidates and promote, edit, or reject them — conversationally, no git or dev skills required. Use when the user asks to curate/review setoku knowledge, or when list_entities reports pending corrections.",
      "tags": [
        "setoku",
        "mcp",
        "company-data",
        "personal-data",
        "household-data",
        "curate"
      ],
      "examples": [
        "/setoku:curate"
      ]
    },
    {
      "id": "setoku:eval",
      "name": "eval",
      "description": "Run the Setoku golden-question eval for this repository and report a scorecard. Use when the user asks to eval/test setoku answer quality, or after significant context-artifact changes.",
      "tags": [
        "setoku",
        "mcp",
        "company-data",
        "personal-data",
        "household-data",
        "eval"
      ],
      "examples": [
        "/setoku:eval"
      ]
    },
    {
      "id": "setoku:generate",
      "name": "generate",
      "description": "Generate or refresh Setoku's business-context knowledge by reading this repository's code — ORM schemas, business logic, migrations, existing docs — and saving it to the knowledge store (commits directly on a curator connector, or proposes for human approval on the everyday analyst connector — no SSH needed). Use when the user asks to generate/update/refresh business context, when setoku tools report an empty knowledge store, or when schema drift is detected.",
      "tags": [
        "setoku",
        "mcp",
        "company-data",
        "personal-data",
        "household-data",
        "generate"
      ],
      "examples": [
        "/setoku:generate"
      ]
    },
    {
      "id": "setoku:onboard",
      "name": "onboard",
      "description": "First-run setup for Setoku in a repo — connect the business database, generate context from the code, and answer a first question end-to-end. Use when the user says \"set up setoku\" or \"onboard\", or when setoku tools report missing config. (Thin wrapper over /setoku:connect.)",
      "tags": [
        "setoku",
        "mcp",
        "company-data",
        "personal-data",
        "household-data",
        "onboard"
      ],
      "examples": [
        "/setoku:onboard"
      ]
    },
    {
      "id": "setoku:answer",
      "name": "answer",
      "description": "Answer a question about the operator's own data (a company's, a household's, or one person's): retrieve the curated context for it (find_context), read the schema, then run a governed read-only query.",
      "tags": [
        "setoku",
        "mcp",
        "analytics",
        "sql",
        "company-data",
        "personal-data",
        "household-data"
      ],
      "examples": [
        "What did we bill last month, using our definition of billed revenue?",
        "Which accounts churned in Q2, excluding the test tenant?",
        "What did we spend on groceries last month, not counting the reimbursed work lunches?"
      ]
    },
    {
      "id": "setoku:publish-app",
      "name": "publish-app",
      "description": "Build a small live app or dashboard over that data and publish it to a link the whole team can open, refreshing against real data.",
      "tags": [
        "setoku",
        "mcp",
        "dashboard",
        "app",
        "sharing"
      ],
      "examples": [
        "Turn that into a dashboard the sales team can watch."
      ]
    }
  ],
  "tools": [
    {
      "name": "find_context",
      "description": "Find context for this connector's data",
      "role": "analyst"
    },
    {
      "name": "list_entities",
      "description": "List everything in the knowledge store",
      "role": "analyst"
    },
    {
      "name": "describe_entity",
      "description": "Full context doc for one entity",
      "role": "analyst"
    },
    {
      "name": "get_metric",
      "description": "Canonical metric definition",
      "role": "analyst"
    },
    {
      "name": "report_correction",
      "description": "Record a context correction / clarification",
      "role": "analyst"
    },
    {
      "name": "list_corrections",
      "description": "List pending knowledge corrections",
      "role": "analyst"
    },
    {
      "name": "resolve_correction",
      "description": "Resolve a pending correction",
      "role": "curator"
    },
    {
      "name": "upsert_context",
      "description": "Create or update a knowledge doc",
      "role": "curator"
    },
    {
      "name": "draft_correction",
      "description": "Attach a drafted doc-edit to a pending correction",
      "role": "janitor"
    },
    {
      "name": "reject_correction",
      "description": "Auto-reject a pending correction",
      "role": "janitor"
    },
    {
      "name": "list_sources",
      "description": "List connected data sources",
      "role": "analyst"
    },
    {
      "name": "get_schema",
      "description": "Every table and column you can query",
      "role": "analyst"
    },
    {
      "name": "run_query",
      "description": "Run a read-only SQL query",
      "role": "analyst"
    },
    {
      "name": "app_guide",
      "description": "How to build a Setoku app",
      "role": "analyst"
    },
    {
      "name": "publish_app",
      "description": "Publish a live app to the box",
      "role": "analyst"
    },
    {
      "name": "update_app",
      "description": "Edit an app you published",
      "role": "analyst"
    },
    {
      "name": "list_apps",
      "description": "List apps published to the box",
      "role": "analyst"
    },
    {
      "name": "get_app",
      "description": "Inspect an app — its full template and panels",
      "role": "analyst"
    },
    {
      "name": "unpublish_app",
      "description": "Archive a published app",
      "role": "analyst"
    },
    {
      "name": "publish_file",
      "description": "Share a file to the box",
      "role": "analyst"
    }
  ],
  "note": "Generated by scripts/build-site-api.ts from the Setoku source tree — do not edit by hand."
}
