NylorunDocsBeta
Management APIMCP servers

Preview an MCP server's tools

POST
/v1/tenant/mcp/preview

Connects to the remote MCP server at url with the credential for that URL in the vault of the Agent agentId, if given (its headers and via; never an identity header), under the Host's address policy, lists its tools within 15 s and closes the connection. It never calls a tool. Each tool comes with the name the model would call it (modelName, made with name), its annotations and its input schema's size. A server that answers 401 is authRequired, with its RFC 9728 protected-resource metadata when it publishes any: it needs a person's sign-in, so reach it through a gateway (via), or with a key. No credential value is in the answer.

Authorization

managementKey
headerAuthorizationBearer <token>

A management key of the Tenant (role management): it reaches the Management API (/v1/tenant/*) and /v1/me, as itself, never for a subject. Issued only on the Tenant's machine (nylorun-operate keys put <id> --role management) or from NYLORUN_MANAGEMENT_KEY_FILE. Never accepted from a browser (Origin).

Header Parameters

Nylorun-Protocol*string

The protocol version, 18

Request Body

application/json
  1. body
requestId?string
Length1 <= length
url*string
Length1 <= length
type?string
Value in"streamable-http""sse"
name?string
Match^[A-Za-z0-9_-]{1,64}$
agentId?string

An Agent id, such as triage or users/alice/triage

Response Body

The server's tools, or that it needs a credential (authRequired)

application/json
  1. response
name*string
url*string
type*string
Value in"streamable-http""sse"
credentialSent*boolean
serverInfo?
instructions?string
tools*array<>
renamed*array<>
authRequired?
import { createAdmin } from "@nylorun/admin";const admin = createAdmin();const preview = await admin.mcp.preview({  url: "https://mcp.linear.app/mcp",  name: "linear",  agentId: "users/alice/support", // its vault's credential for the URL});
{  "name": "string",  "url": "string",  "type": "streamable-http",  "credentialSent": true,  "serverInfo": {    "property1": null,    "property2": null  },  "instructions": "string",  "tools": [    {      "serverToolName": "string",      "modelName": "string",      "description": "string",      "annotations": {        "property1": null,        "property2": null      },      "schemaBytes": 0    }  ],  "renamed": [    {      "serverToolName": "string",      "name": "string"    }  ],  "authRequired": {    "resourceMetadataUrl": "string",    "resourceMetadata": {      "property1": null,      "property2": null    }  }}