Skip to main content

Internal MCP export

Generated from apiome-rest/openapi.yaml (API version 1.719.0) — do not edit by hand. How to authenticate is on the REST API reference.

Tag: internal-mcp-export · 2 operations

POST /v1/internal/mcp/export/run​

Run an export for the MCP version.export tool

Internal (X-Internal-Service-Token). Starts an export job for any registered target (the pipeline of POST /v1/export/{tenant}/jobs) and waits up to waitSeconds; or, with jobId, collects a job a previous call left running. A conversion that loses fidelity (tier other than lossless) without allowLossy answers state: blocked with the report and the canonical advisory and emits nothing. A completed job answers with the fidelity envelope (including the structured LossinessReport), the guard and the files — inline up to APIOME_MCP_EXPORT_INLINE_MAX_BYTES, otherwise with downloadPath. 400 / 422 for an unknown target or invalid options; 429 when the tenant's export slots are full; 404 for an unknown job.

Operation id: mcp_export_run_v1_internal_mcp_export_run_post

Parameters

NameInTypeRequiredDescription
X-Internal-Service-Tokenheaderstring or nullnoHeader parameter: X Internal Service Token.

Request body (required)

Request body for run an export for the mcp version.export tool.

Responses

StatusDescriptionBody
200Successful response for run an export for the mcp version.export tool.application/json McpExportRunResponse
422Validation Errorapplication/json HTTPValidationError

POST /v1/internal/mcp/export/targets​

Export targets for the MCP export.targets tool

Internal (X-Internal-Service-Token). The same answer as GET /v1/export/{tenant}/targets for the given tenant: every registered target with its per-source fidelity tier.

Operation id: mcp_export_targets_v1_internal_mcp_export_targets_post

Parameters

NameInTypeRequiredDescription
X-Internal-Service-Tokenheaderstring or nullnoHeader parameter: X Internal Service Token.

Request body (required)

Request body for export targets for the mcp export.targets tool.

Responses

StatusDescriptionBody
200Successful response for export targets for the mcp export.targets tool.application/json ExportTargetsResponse
422Validation Errorapplication/json HTTPValidationError

Schemas used​

ExportTargetsResponse​

The per-target fidelity list for one source revision (MFX-2.5).

PropertyTypeRequiredDescription
artifactstringyesThe artifact (project) id the fidelity was computed for.
versionstring or nullnoThe version selector as requested (label, UUID, or null).
version_record_idstringyesThe resolved revision (versions.id).
version_labelstring or nullnoThe resolved revision's version label (e.g. 1.0.0).
targetsarray of ExportTargetFidelitynoEvery registered target with its per-source fidelity, sorted by target key.
fidelity_statusenum "ready", "pending"noready when every target carries its fidelity badge; pending when a fidelity=deferred request is still scoring them (poll fidelity_token).
fidelity_tokenstring or nullnoWhile pending: the token to poll at GET …/targets/fidelity/{token}.

HTTPValidationError​

Validation error response emitted when request data fails schema checks.

PropertyTypeRequiredDescription
detailarray of ValidationErrornoDetail.

McpExportRunRequest​

version.export: start an export (target) or collect one (jobId).

PropertyTypeRequiredDescription
tenantIdstringyesThe MCP key's tenant (trusted: internal route).
artifactstring or nullnoThe artifact id (required to start a job).
versionstring or nullnoRevision id or label; the latest when omitted.
targetstring or nullnoAny registered target key (export.targets).
optionsobject or nullnoThe target's emit options (MFX-1.4).
confirmbooleannoProceed with a severe conversion (MFX-3.3).
allowLossybooleannoEmit even when the conversion loses fidelity (MFX-40.2; the CLI --force). Without it a lossy conversion answers blocked and emits nothing.
jobIdstring or nullnoCollect a job a previous call left running, instead of starting one.
waitSecondsintegernoHow long to wait for the job before answering running.

McpExportRunResponse​

What version.export answers.

Attributes: job_id: The export job; None when blocked (no job was started). state: blocked (a lossy conversion without allowLossy: nothing emitted), queued / running (collect it again with jobId), completed, failed or canceled. advisory: The canonical fidelity advisory (MFX-2.4 ExportAdvisory.message) — word for word what the UI, browse and the CLI show; None until the fidelity is known. fidelity: The full fidelity envelope of a one-target export: tier, the structured LossinessReport (report), the advisory. guard: The transcoding guard (MFX-3.3): verdict, whether it needs confirm. files: The emitted files; each carries content when content_inline. download_path: The REST download of the whole artifact, for files too large to inline. error: The structured failure of a failed job.

PropertyTypeRequiredDescription
jobIdstring or nullnoJob ID.
stateenum "blocked", "queued", "running", "completed", "failed", "canceled"yesState.
advisorystring or nullnoAdvisory.
artifactstring or nullnoArtifact.
targetstring or nullnoTarget.
versionRecordIdstring or nullnoVersion Record ID.
versionLabelstring or nullnoVersion Label.
fidelityobject or nullnoFidelity.
guardobject or nullnoGuard.
validationobject or nullnoValidation.
deliveryobject or nullnoDelivery.
mediaTypestring or nullnoMedia Type.
filesarray of McpExportFilenoFiles.
contentInlinebooleannoContent Inline.
downloadPathstring or nullnoDownload Path.
errorobject or nullnoError.

McpExportTargetsRequest​

export.targets: which source's targets.

PropertyTypeRequiredDescription
tenantIdstringyesThe MCP key's tenant (trusted: internal route).
artifactstringyesThe artifact (project or catalog item) id.
versionstring or nullnoRevision id or label; the latest when omitted.