Skip to content

LCORE-1507: Added missing description about MCP endpoints#1354

Merged
tisnik merged 1 commit intolightspeed-core:mainfrom
tisnik:lcore-1507-added-missing-description
Mar 19, 2026
Merged

LCORE-1507: Added missing description about MCP endpoints#1354
tisnik merged 1 commit intolightspeed-core:mainfrom
tisnik:lcore-1507-added-missing-description

Conversation

@tisnik
Copy link
Copy Markdown
Contributor

@tisnik tisnik commented Mar 19, 2026

Description

LCORE-1507: Added missing description about MCP endpoints

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement
  • Benchmarks improvement

Tools used to create PR

  • Assisted-by: N/A
  • Generated by: N/A

Related Tickets & Documents

  • Related Issue #LCORE-1507

Summary by CodeRabbit

  • New Features
    • Added MCP server management capabilities: register, list, and unregister servers dynamically.
    • Enhanced inference with optional verbose debugging mode and detailed metadata output.
    • Extended inference responses to include tool calls, results, referenced documents, and token counts.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 19, 2026

Walkthrough

The pull request adds three new REST API endpoints for MCP server management (list, register, delete), extends RBAC actions with three new MCP-related actions, introduces multiple new schemas for MCP server operations, updates inference capabilities with debug fields, adjusts OKP configuration, and adds Red Hat identity header size configuration to the OpenAPI specification.

Changes

Cohort / File(s) Summary
MCP Server Management API
docs/openapi.json, docs/openapi.md
Added three new endpoints for dynamic MCP server management: GET /v1/mcp-servers (list), POST /v1/mcp-servers (register), DELETE /v1/mcp-servers/{name} (delete). Introduced 8 new schemas including MCPServerInfo, MCPServerRegistrationRequest/Response, MCPServerListResponse, and MCPServerDeleteResponse. Extended RBAC Action enum with register_mcp_server, list_mcp_servers, delete_mcp_server.
Inference & Debug Capabilities
docs/openapi.json, docs/openapi.md
Added include_metadata to RlsapiV1InferRequest and allow_verbose_infer to Customization. Extended RlsapiV1InferData with new fields: tool_calls, tool_results, rag_chunks, referenced_documents, input_tokens, output_tokens.
Configuration Updates
docs/openapi.json, docs/openapi.md
Added max_header_size to RHIdentityConfiguration for base64-encoded identity header size limits. Changed OkpConfiguration.chunk_filter_query from required string to nullable anyOf [string, null] type.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title describes adding documentation about MCP endpoints, but the actual changeset includes not only documentation but also significant API schema changes (new endpoints, RBAC actions, schemas, and configuration updates). Revise the title to reflect the full scope of changes, such as: 'LCORE-1507: Add MCP server management API and update inference/debug capabilities' to accurately represent all modifications beyond just documentation.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (4)
docs/openapi.md (4)

485-485: Inconsistent capitalization in handler name.

The handler name uses "Mcp" but should use "MCP" for consistency with other references throughout the document. The acronym MCP (Model Context Protocol) should maintain consistent capitalization.

📝 Suggested fix
-> **List Mcp Servers Handler**
+> **List MCP Servers Handler**
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/openapi.md` at line 485, Update the heading text "List Mcp Servers
Handler" to use the consistent acronym capitalization "List MCP Servers Handler"
so it matches other references to MCP (Model Context Protocol); locate the
heading string in the docs/openapi.md and replace "Mcp" with "MCP".

116-117: Consider adding Oxford comma for consistency.

The updated description is more informative, but for consistency with style guides, consider using an Oxford comma: "service name, version**,** and Llama-stack version."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/openapi.md` around lines 116 - 117, Update the description string for
the /info endpoint by inserting an Oxford comma: change "service name, version
and Llama-stack version" to "service name, version, and Llama-stack version"
wherever that exact sentence/description for the GET /info endpoint appears (the
text starting "Process GET requests to the /info endpoint...").

557-557: Inconsistent capitalization in handler name.

Same issue as the GET endpoint - "Mcp" should be "MCP" for consistency.

📝 Suggested fix
-> **Register Mcp Server Handler**
+> **Register MCP Server Handler**
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/openapi.md` at line 557, Update the inconsistent capitalization of "Mcp"
to "MCP" in the docs header and any matching occurrences; specifically change
the heading string "Register Mcp Server Handler" to "Register MCP Server
Handler" (and mirror the same correction wherever the symbol/phrase "Mcp"
appears in this section to match the GET endpoint naming).

663-663: Inconsistent capitalization in handler name.

Same issue - "Mcp" should be "MCP" for consistency with the acronym.

📝 Suggested fix
-> **Delete Mcp Server Handler**
+> **Delete MCP Server Handler**
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/openapi.md` at line 663, The handler title "Delete Mcp Server Handler"
uses inconsistent capitalization for the acronym; update the header text to
"Delete MCP Server Handler" in docs/openapi.md (search for the exact string
"Delete Mcp Server Handler") and also scan for other occurrences of "Mcp" in
related handler names (e.g., any "Create Mcp Server Handler", "Get Mcp Server
Handler") and normalize them to "MCP" so all handler titles consistently use the
uppercase acronym.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/openapi.json`:
- Around line 7313-7317: Update the OpenAPI docs so the verbose-infer gating is
documented consistently: for each metadata field sibling to
"allow_verbose_infer" (and its definition), add that the field appears only when
request.query.include_metadata=true AND
request.body.customization.allow_verbose_infer=true; then update the
RlsapiV1InferResponse schema and example to show the expanded "data" payload
(not just text + request_id) when both flags are set, and ensure descriptions
mention both switches (include_metadata and customization.allow_verbose_infer)
so the contract matches runtime behavior.
- Around line 958-977: The 403 response example for the static-server delete
endpoint only shows RBAC denial; update the "403" block in docs/openapi.json
(the one referencing "$ref": "#/components/schemas/ForbiddenResponse") to
include an additional example that represents the case where a named server
exists and was loaded from YAML (i.e., a ForbiddenResponse with a cause like
"Named server 'X' was loaded from YAML and cannot be deleted" and an appropriate
response message), mirroring the style used for the existing 404 example; apply
the same update to the other 403 occurrence mentioned in the comment so both
delete docs include this YAML-loaded-server forbidden example.
- Around line 8356-8380: The docs currently present
MCPServerRegistrationRequest.timeout as if per-server timeouts are enforced, but
the register handler stores body.timeout without forwarding it to the downstream
Llama Stack registration (which only sends toolgroup_id, provider_id, and
mcp_endpoint), so either update docs or code: either (A) edit the
MCPServerRegistrationRequest description (and the "timeout" property's
description) to clearly state timeout is accepted but not enforced/for future
use (reference: MCPServerRegistrationRequest.timeout and
ModelContextProtocolServer.timeout), or (B) implement forwarding so the register
handler includes body.timeout when calling the Llama Stack registration API (the
call that currently sends toolgroup_id, provider_id, mcp_endpoint) so per-server
timeout is actually registered; pick one and make the corresponding change.

In `@docs/openapi.md`:
- Around line 482-773: Add five missing OpenAPI component schemas to the
Components/schemas section: define MCPServerListResponse as an object with an
"items" array of MCP server objects (or references to the existing MCP server
schema) and any "source" metadata; define MCPServerRegistrationRequest as the
request body schema (e.g., required fields like "name" (string), "url" (string),
and optional "metadata"/"auth" as appropriate); define
MCPServerRegistrationResponse as the created resource representation (e.g.,
"name", "url", "id" and any "source" or "registered_at" fields plus a "detail"
or status field if your API uses it); define ConflictResponse as a standard
error object with a "detail" object containing "cause" and "response" strings;
and define MCPServerDeleteResponse as the deletion confirmation object (e.g.,
"name" or "id" and a "detail" object with "cause" and "response"). Ensure the
new schema names exactly match the referenced names (MCPServerListResponse,
MCPServerRegistrationRequest, MCPServerRegistrationResponse, ConflictResponse,
MCPServerDeleteResponse) so the link fragments resolve.

---

Nitpick comments:
In `@docs/openapi.md`:
- Line 485: Update the heading text "List Mcp Servers Handler" to use the
consistent acronym capitalization "List MCP Servers Handler" so it matches other
references to MCP (Model Context Protocol); locate the heading string in the
docs/openapi.md and replace "Mcp" with "MCP".
- Around line 116-117: Update the description string for the /info endpoint by
inserting an Oxford comma: change "service name, version and Llama-stack
version" to "service name, version, and Llama-stack version" wherever that exact
sentence/description for the GET /info endpoint appears (the text starting
"Process GET requests to the /info endpoint...").
- Line 557: Update the inconsistent capitalization of "Mcp" to "MCP" in the docs
header and any matching occurrences; specifically change the heading string
"Register Mcp Server Handler" to "Register MCP Server Handler" (and mirror the
same correction wherever the symbol/phrase "Mcp" appears in this section to
match the GET endpoint naming).
- Line 663: The handler title "Delete Mcp Server Handler" uses inconsistent
capitalization for the acronym; update the header text to "Delete MCP Server
Handler" in docs/openapi.md (search for the exact string "Delete Mcp Server
Handler") and also scan for other occurrences of "Mcp" in related handler names
(e.g., any "Create Mcp Server Handler", "Get Mcp Server Handler") and normalize
them to "MCP" so all handler titles consistently use the uppercase acronym.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e9d8a56c-e21b-4af6-af67-f33bcf29348d

📥 Commits

Reviewing files that changed from the base of the PR and between bb0f23a and 84919d8.

📒 Files selected for processing (2)
  • docs/openapi.json
  • docs/openapi.md

Comment on lines +958 to +977
"403": {
"description": "Permission denied",
"content": {
"application/json": {
"examples": {
"endpoint": {
"value": {
"detail": {
"cause": "User 6789 is not authorized to access this endpoint.",
"response": "User does not have permission to access this endpoint"
}
}
}
},
"schema": {
"$ref": "#/components/schemas/ForbiddenResponse"
}
}
}
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add the static-server 403 example to the delete docs.

Adding the 404 example helps, but the handler also returns ForbiddenResponse when the named server exists and was loaded from YAML. The current 403 block only shows RBAC denial, so one of this endpoint’s main failure modes is still undocumented.

Suggested doc shape
                     "403": {
                         "description": "Permission denied",
                         "content": {
                             "application/json": {
                                 "examples": {
                                     "endpoint": {
                                         "value": {
                                             "detail": {
                                                 "cause": "User 6789 is not authorized to access this endpoint.",
                                                 "response": "User does not have permission to access this endpoint"
                                             }
                                         }
+                                    },
+                                    "static mcp server": {
+                                        "value": {
+                                            "detail": {
+                                                "cause": "MCP server 'test-mcp-server' was configured in lightspeed-stack.yaml and cannot be removed via the API.",
+                                                "response": "Cannot delete statically configured MCP server"
+                                            }
+                                        }
                                     }
                                 },
                                 "schema": {
                                     "$ref": "#/components/schemas/ForbiddenResponse"
                                 }

Also applies to: 8673-8680

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/openapi.json` around lines 958 - 977, The 403 response example for the
static-server delete endpoint only shows RBAC denial; update the "403" block in
docs/openapi.json (the one referencing "$ref":
"#/components/schemas/ForbiddenResponse") to include an additional example that
represents the case where a named server exists and was loaded from YAML (i.e.,
a ForbiddenResponse with a cause like "Named server 'X' was loaded from YAML and
cannot be deleted" and an appropriate response message), mirroring the style
used for the existing 404 example; apply the same update to the other 403
occurrence mentioned in the comment so both delete docs include this
YAML-loaded-server forbidden example.

Comment on lines +7313 to 7317
"allow_verbose_infer": {
"type": "boolean",
"title": "Allow Verbose Infer",
"default": false
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Tighten the verbose-infer gating docs so the contract stays consistent.

These fields are effectively behind two switches: include_metadata=true and customization.allow_verbose_infer=true. Right now the field-level descriptions only mention the request flag, and the surrounding response docs still describe data as just text plus request_id.

Suggested wording pattern
-                        "description": "Tool calls made during inference (requires include_metadata=true)"
+                        "description": "Tool calls made during inference (returned only when include_metadata=true and customization.allow_verbose_infer=true)"

Apply the same wording to the sibling metadata fields, and refresh the parent RlsapiV1InferResponse description/example to match the expanded payload.

Also applies to: 12774-12911

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/openapi.json` around lines 7313 - 7317, Update the OpenAPI docs so the
verbose-infer gating is documented consistently: for each metadata field sibling
to "allow_verbose_infer" (and its definition), add that the field appears only
when request.query.include_metadata=true AND
request.body.customization.allow_verbose_infer=true; then update the
RlsapiV1InferResponse schema and example to show the expanded "data" payload
(not just text + request_id) when both flags are set, and ensure descriptions
mention both switches (include_metadata and customization.allow_verbose_infer)
so the contract matches runtime behavior.

Comment on lines +8356 to +8380
"timeout": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0.0
},
{
"type": "null"
}
],
"title": "Timeout",
"description": "Request timeout in seconds for the MCP server",
"examples": [
30
]
}
},
"additionalProperties": false,
"type": "object",
"required": [
"input_schema",
"name"
"name",
"url"
],
"title": "MCPListToolsTool",
"description": "Tool definition returned by MCP list tools operation.\n\n:param input_schema: JSON schema defining the tool's input parameters\n:param name: Name of the tool\n:param description: (Optional) Description of what the tool does"
"title": "MCPServerRegistrationRequest",
"description": "Request model for dynamically registering an MCP server.\n\nAttributes:\n name: Unique name for the MCP server.\n url: URL of the MCP server endpoint.\n provider_id: MCP provider identification (defaults to \"model-context-protocol\").\n authorization_headers: Optional headers to send to the MCP server.\n headers: Optional list of HTTP header names to forward from incoming requests.\n timeout: Optional request timeout in seconds.\n\nExample:\n ```python\n request = MCPServerRegistrationRequest(\n name=\"my-tools\",\n url=\"http://localhost:8888/mcp\",\n )\n ```",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Don’t present dynamic MCP timeout as enforced yet.

The register handler stores body.timeout, but the downstream Llama Stack registration call only sends toolgroup_id, provider_id, and mcp_endpoint. So this field is accepted today without actually enforcing a per-server request timeout, while the static ModelContextProtocolServer.timeout docs already mark the feature as future-use-only.

Suggested wording
-                        "description": "Request timeout in seconds for the MCP server",
+                        "description": "Stored timeout hint for the MCP server. Not enforced yet; reserved for future use when Llama Stack adds timeout support.",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/openapi.json` around lines 8356 - 8380, The docs currently present
MCPServerRegistrationRequest.timeout as if per-server timeouts are enforced, but
the register handler stores body.timeout without forwarding it to the downstream
Llama Stack registration (which only sends toolgroup_id, provider_id, and
mcp_endpoint), so either update docs or code: either (A) edit the
MCPServerRegistrationRequest description (and the "timeout" property's
description) to clearly state timeout is accepted but not enforced/for future
use (reference: MCPServerRegistrationRequest.timeout and
ModelContextProtocolServer.timeout), or (B) implement forwarding so the register
handler includes body.timeout when calling the Llama Stack registration API (the
call that currently sends toolgroup_id, provider_id, mcp_endpoint) so per-server
timeout is actually registered; pick one and make the corresponding change.

Comment on lines +482 to +773

## GET `/v1/mcp-servers`

> **List Mcp Servers Handler**

List all registered MCP servers.

Returns both statically configured (from YAML) and dynamically
registered (via API) MCP servers.

Raises:
HTTPException: If configuration is not loaded.

Returns:
MCPServerListResponse: List of all registered MCP servers with source info.





### ✅ Responses

| Status Code | Description | Component |
|-------------|-----------------------|-------------------------------------------------------------|
| 200 | Successful response | [MCPServerListResponse](#mcpserverlistresponse) |
| 401 | Unauthorized | [UnauthorizedResponse](#unauthorizedresponse) |
| 403 | Permission denied | [ForbiddenResponse](#forbiddenresponse) |
| 500 | Internal server error | [InternalServerErrorResponse](#internalservererrorresponse) |

Examples


```json
{
"detail": {
"cause": "No Authorization header found",
"response": "Missing or invalid credentials provided by client"
}
}
```




```json
{
"detail": {
"cause": "No token found in Authorization header",
"response": "Missing or invalid credentials provided by client"
}
}
```


```json
{
"detail": {
"cause": "User 6789 is not authorized to access this endpoint.",
"response": "User does not have permission to access this endpoint"
}
}
```


```json
{
"detail": {
"cause": "Lightspeed Stack configuration has not been initialized.",
"response": "Configuration is not loaded"
}
}
```

## POST `/v1/mcp-servers`

> **Register Mcp Server Handler**

Register an MCP server dynamically at runtime.

Adds the MCP server to the runtime configuration and registers it
as a toolgroup with Llama Stack so it becomes available for queries.

Raises:
HTTPException: On duplicate name, Llama Stack connection error,
or registration failure.

Returns:
MCPServerRegistrationResponse: Details of the newly registered server.





### 📦 Request Body

[MCPServerRegistrationRequest](#mcpserverregistrationrequest)

### ✅ Responses

| Status Code | Description | Component |
|-------------|-------------------------|-----------------------------------------------------------------|
| 201 | Successful response | [MCPServerRegistrationResponse](#mcpserverregistrationresponse) |
| 401 | Unauthorized | [UnauthorizedResponse](#unauthorizedresponse) |
| 403 | Permission denied | [ForbiddenResponse](#forbiddenresponse) |
| 409 | Resource already exists | [ConflictResponse](#conflictresponse) |
| 500 | Internal server error | [InternalServerErrorResponse](#internalservererrorresponse) |
| 503 | Service unavailable | [ServiceUnavailableResponse](#serviceunavailableresponse) |
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) |

Examples





```json
{
"detail": {
"cause": "No Authorization header found",
"response": "Missing or invalid credentials provided by client"
}
}
```




```json
{
"detail": {
"cause": "No token found in Authorization header",
"response": "Missing or invalid credentials provided by client"
}
}
```



```json
{
"detail": {
"cause": "User 6789 is not authorized to access this endpoint.",
"response": "User does not have permission to access this endpoint"
}
}
```



```json
{
"detail": {
"cause": "Mcp Server with name 'test-mcp-server' is already registered",
"response": "Mcp Server already exists"
}
}
```



```json
{
"detail": {
"cause": "Lightspeed Stack configuration has not been initialized.",
"response": "Configuration is not loaded"
}
}
```


```json
{
"detail": {
"cause": "Connection error while trying to reach backend service.",
"response": "Unable to connect to Llama Stack"
}
}
```

## DELETE `/v1/mcp-servers/{name}`

> **Delete Mcp Server Handler**

Unregister a dynamically registered MCP server.

Removes the MCP server from the runtime configuration and unregisters
its toolgroup from Llama Stack. Only servers registered via the API
can be deleted; statically configured servers cannot be removed.

Raises:
HTTPException: If the server is not found, is statically configured,
or Llama Stack unregistration fails.

Returns:
MCPServerDeleteResponse: Confirmation of the deletion.



### 🔗 Parameters

| Name | Type | Required | Description |
|------|--------|----------|-------------|
| name | string | True | |


### ✅ Responses

| Status Code | Description | Component |
|-------------|-----------------------|-------------------------------------------------------------|
| 200 | Successful response | [MCPServerDeleteResponse](#mcpserverdeleteresponse) |
| 401 | Unauthorized | [UnauthorizedResponse](#unauthorizedresponse) |
| 403 | Permission denied | [ForbiddenResponse](#forbiddenresponse) |
| 404 | Resource not found | [NotFoundResponse](#notfoundresponse) |
| 500 | Internal server error | [InternalServerErrorResponse](#internalservererrorresponse) |
| 503 | Service unavailable | [ServiceUnavailableResponse](#serviceunavailableresponse) |
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) |

Examples





```json
{
"detail": {
"cause": "No Authorization header found",
"response": "Missing or invalid credentials provided by client"
}
}
```




```json
{
"detail": {
"cause": "No token found in Authorization header",
"response": "Missing or invalid credentials provided by client"
}
}
```




```json
{
"detail": {
"cause": "User 6789 is not authorized to access this endpoint.",
"response": "User does not have permission to access this endpoint"
}
}
```





```json
{
"detail": {
"cause": "Mcp Server with ID test-mcp-server does not exist",
"response": "Mcp Server not found"
}
}
```




```json
{
"detail": {
"cause": "Lightspeed Stack configuration has not been initialized.",
"response": "Configuration is not loaded"
}
}
```




```json
{
"detail": {
"cause": "Connection error while trying to reach backend service.",
"response": "Unable to connect to Llama Stack"
}
}
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for the missing schema definitions
for schema in MCPServerListResponse MCPServerRegistrationRequest MCPServerRegistrationResponse ConflictResponse MCPServerDeleteResponse; do
  echo "Searching for $schema:"
  rg -n "## $schema\$" docs/
done

Repository: lightspeed-core/lightspeed-stack

Length of output: 272


🏁 Script executed:

#!/bin/bash
# Check the structure of the Components section
echo "=== Searching for Components section header ==="
rg -n "^#+ Components" docs/openapi.md | head -5

echo ""
echo "=== Checking file length to see if line 3784+ exists ==="
wc -l docs/openapi.md

echo ""
echo "=== Searching for the schema names as any level headings ==="
for schema in MCPServerListResponse MCPServerRegistrationRequest MCPServerRegistrationResponse ConflictResponse MCPServerDeleteResponse; do
  echo "--- $schema ---"
  rg -n "^#+.*$schema" docs/openapi.md
done

echo ""
echo "=== Searching for these schema names anywhere in the document ==="
for schema in MCPServerListResponse MCPServerRegistrationRequest MCPServerRegistrationResponse ConflictResponse MCPServerDeleteResponse; do
  count=$(rg -c "$schema" docs/openapi.md)
  echo "$schema: $count matches"
done

Repository: lightspeed-core/lightspeed-stack

Length of output: 670


🏁 Script executed:

#!/bin/bash
# Check what's around line 3784 to understand the Components structure
echo "=== Lines around 3784 (Components section area) ==="
sed -n '3780,3810p' docs/openapi.md | cat -n

echo ""
echo "=== Search for where these schemas might be defined (looking for pattern variations) ==="
# Look for these names with various patterns
for schema in MCPServerListResponse MCPServerRegistrationRequest MCPServerRegistrationResponse ConflictResponse MCPServerDeleteResponse; do
  echo "--- Searching for $schema context ---"
  rg -B 2 -A 2 "$schema" docs/openapi.md | head -20
  echo ""
done

echo ""
echo "=== Check the actual structure: look for 'Components' anywhere ==="
rg -n -i "components" docs/openapi.md | head -10

Repository: lightspeed-core/lightspeed-stack

Length of output: 4635


🏁 Script executed:

#!/bin/bash
# Check if these schemas are defined anywhere further in the Components section
echo "=== Search for all ## headings in Components section (lines 3784-5972) ==="
sed -n '3784,$p' docs/openapi.md | grep -n "^## " | tail -50

echo ""
echo "=== Specifically look for our missing schemas in Components section ==="
sed -n '3784,$p' docs/openapi.md | grep -i "mcp\|conflict" | head -20

echo ""
echo "=== Count total ## schema definitions in Components section ==="
sed -n '3784,$p' docs/openapi.md | grep -c "^## "

echo ""
echo "=== Look for schema definitions that start with M, C, or any that might match ==="
sed -n '3784,$p' docs/openapi.md | grep "^## " | sort

Repository: lightspeed-core/lightspeed-stack

Length of output: 6891


🏁 Script executed:

#!/bin/bash
# Confirm that the missing schemas are indeed referenced but not defined
echo "=== Verify ConflictResponse is NOT in the schema definitions ==="
rg "^## ConflictResponse" docs/openapi.md
echo "Found? $?"

echo ""
echo "=== Show all response schema types that ARE defined ==="
sed -n '3784,$p' docs/openapi.md | grep "^## .*Response" | sort

echo ""
echo "=== Verify that MCPServerListResponse, etc. are truly missing ==="
for schema in MCPServerListResponse MCPServerRegistrationRequest MCPServerRegistrationResponse MCPServerDeleteResponse ConflictResponse; do
  defined=$(sed -n '3784,$p' docs/openapi.md | grep -c "^## $schema\$")
  echo "$schema: defined=$defined"
done

Repository: lightspeed-core/lightspeed-stack

Length of output: 1312


🏁 Script executed:

#!/bin/bash
# Final verification: confirm these broken links will cause issues
echo "=== Confirm none of these 5 schemas exist in Components section ==="
for schema in MCPServerListResponse MCPServerRegistrationRequest MCPServerRegistrationResponse ConflictResponse MCPServerDeleteResponse; do
  count=$(sed -n '3784,$p' docs/openapi.md | grep -c "^## $schema")
  if [ $count -eq 0 ]; then
    echo "$schema: NOT DEFINED in Components"
  else
    echo "$schema: FOUND in Components"
  fi
done

echo ""
echo "=== Show lines where these schemas are referenced (broken links) ==="
rg -n "MCPServerListResponse|MCPServerRegistrationRequest|MCPServerRegistrationResponse|ConflictResponse|MCPServerDeleteResponse" docs/openapi.md | grep -v "^3784" | head -15

Repository: lightspeed-core/lightspeed-stack

Length of output: 1208


Add missing schema definitions for new MCP endpoints.

The documentation references five schemas that are not defined in the Components section:

  • MCPServerListResponse (line 506)
  • MCPServerRegistrationRequest (line 577)
  • MCPServerRegistrationResponse (line 583)
  • ConflictResponse (line 586)
  • MCPServerDeleteResponse (line 691)

Add these schema definitions to the Components section (starting at line 3784) to resolve the broken link fragments.

🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 506-506: Link fragments should be valid

(MD051, link-fragments)


[warning] 577-577: Link fragments should be valid

(MD051, link-fragments)


[warning] 583-583: Link fragments should be valid

(MD051, link-fragments)


[warning] 586-586: Link fragments should be valid

(MD051, link-fragments)


[warning] 691-691: Link fragments should be valid

(MD051, link-fragments)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/openapi.md` around lines 482 - 773, Add five missing OpenAPI component
schemas to the Components/schemas section: define MCPServerListResponse as an
object with an "items" array of MCP server objects (or references to the
existing MCP server schema) and any "source" metadata; define
MCPServerRegistrationRequest as the request body schema (e.g., required fields
like "name" (string), "url" (string), and optional "metadata"/"auth" as
appropriate); define MCPServerRegistrationResponse as the created resource
representation (e.g., "name", "url", "id" and any "source" or "registered_at"
fields plus a "detail" or status field if your API uses it); define
ConflictResponse as a standard error object with a "detail" object containing
"cause" and "response" strings; and define MCPServerDeleteResponse as the
deletion confirmation object (e.g., "name" or "id" and a "detail" object with
"cause" and "response"). Ensure the new schema names exactly match the
referenced names (MCPServerListResponse, MCPServerRegistrationRequest,
MCPServerRegistrationResponse, ConflictResponse, MCPServerDeleteResponse) so the
link fragments resolve.

@tisnik tisnik merged commit 7e811e2 into lightspeed-core:main Mar 19, 2026
21 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant