---
title: "Discover By Intent Post"
method: POST
path: "/mcp/discover/by_intent"
tags: ["MCP"]
---

# Discover By Intent Post

`POST /mcp/discover/by_intent`

## Request

- Base URL: `https://api.agentstack.tech` (the document declares no server; this is the origin it was published from)
- URL: `https://api.agentstack.tech/mcp/discover/by_intent`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

POST variant — JSON body ``q`` / ``query`` / ``intent`` / ``search`` (SDK-compatible).

Optional body fields (parity with ``discovery.search``):

- ``semantic_contract``: fingerprinted GoalSemanticContract — skips re-compile
- ``observed``: inverse orchestration slots (completed_steps, workflow_state_key)
- ``include_scope``: ``1`` / ``true`` — attach catalog scope stats (O(registry); opt-in)
- ``domain``, ``scope``, ``focus_node_id``: routing / hydrate gate (same as GET query)
- ``supplements``: pre-built archetype/recipe block (skip rebuild in intent payload)

## Query parameters

- `intent` string, nullable: Intent description (e.g., 'create card game')
- `query` string, nullable: Alias for intent (legacy GET clients)
- `q` string, nullable: Discovery search term (parity with discovery.search)
- `search` string, nullable: Alias for q/query (discovery.search parity)
- `category` string, nullable: Optional category filter
- `tokens` string, nullable: Admin debug: comma GTPI tokens — adds gtpi_debug bindings

## Headers

- `Idempotency-Key` string

## Response `200`

Successful Response

- object

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `422`: Validation Error
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/agentstack/apis/agentstack-core-api.md) · [All operations](https://skmtc.dev/agentstack/apis/agentstack-core-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentstack/apis/agentstack-core-api/revisions/8ecf3406e74a?raw)
