Skip to content

Commit 97bb7de

Browse files
committed
More Judy's comments
1 parent 5c0975f commit 97bb7de

7 files changed

+38
-37
lines changed

modules/model-context-protocol-tools/con-understand-and-respond-to-mcp-tool-error-messages.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
[id="con-understand-and-respond-to-mcp-tool-error-messages.adoc_{context}"]
44
= Understand and respond to MCP tool error messages
55

6-
The response from the MCP tools provides an optional error message output that are used to communicate any errors encountered during the execution of the tool, in addition to potential input validation errors.
6+
The MCP tools response provides an optional error message that communicates any issues encountered during the use of the tool, including potential input validation errors.

modules/model-context-protocol-tools/proc-checking-logs-for-mcp-tool-execution-and-errors.adoc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
[id="proc-checking-logs-for-mcp-tool-execution-and-errors.adoc_{context}"]
44
= Checking logs for MCP tool execution and errors
55

6-
The {backstage} `LoggerService`` target name starts with the name of the MCP tool (either `software-catalog-mcp-tool` or `techdocs-mcp-tool`). By default, a log is generated when the MCP tools are being executed, For example:
7-
+
8-
[source=]
9-
`[backend]: 2025-09-25T16:24:22.660Z software-catalog-mcp-tool info fetch-catalog-entities: Fetching catalog entities with options: kind="Component"`
6+
The {backstage} `LoggerService` target name starts with the name of the MCP tool (either `software-catalog-mcp-tool` or `techdocs-mcp-tool`). The MCP tools generate a log by default. For example:
107

8+
[source,terminal]
9+
----
10+
`[backend]: 2025-09-25T16:24:22.660Z software-catalog-mcp-tool info fetch-catalog-entities: Fetching catalog entities with options: kind="Component"`
11+
----
1112
If any errors occur in the MCP tools, check the logs.

modules/model-context-protocol-tools/proc-configuring-mcp-clients-to-access-the-rhdh-server.adoc

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -56,41 +56,43 @@ type: Opaque
5656
}
5757
}
5858
----
59-
6059
where:
61-
`<MCP_TOKEN>`:: Previously configured static token
62-
`<RHDH_HOST>`:: Hostname of your {product-very-short} instance
60+
61+
`<MCP_TOKEN>`:: Enter the previously configured static token
62+
`<{product-very-short}_HOST>`:: Enter the hostname of your {product-very-short} instance
6363

6464
* Configure the *Continue* client.
65+
6566
.. In your agent yaml configuration file, add the following configuration:
6667
+
67-
[source,yaml]
68+
[source,yaml,subs="+attributes,+quotes"]
6869
----
6970
mcpServers:
7071
- name: backstage-actions
7172
type: sse
72-
url: https://<RHDH_HOST>/api/mcp-actions/v1/sse
73+
url: https://<{product-very-short}_HOST>/api/mcp-actions/v1/sse
7374
requestOptions:
7475
headers:
7576
Authorization: "Bearer <MCP_TOKEN>"
7677
----
7778

7879
where:
79-
`<MCP_TOKEN>`:: Previously configured static token
80-
`<RHDH_HOST>`:: Hostname of your {product-very-short} instance
80+
81+
`<MCP_TOKEN>`:: Enter the previously configured static token
82+
`<{product-very-short}_HOST>`:: Enter the hostname of your {product-very-short} instance
8183

8284
* Configure the *Lightspeed Plugin/Lightspeed Core (LCS)* client.
8385
.. In the `lightspeed-stack.yaml` configuration, add the following configuration for `mcp_servers`:
8486
+
85-
[source,yaml]
87+
[source,yaml,subs="+attributes,+quotes"]
8688
----
8789
mcp_servers:
8890
- name: mcp::backstage
8991
provider_id: model-context-protocol
90-
url: https://<RHDH_HOST>/api/mcp-actions/v1
92+
url: https://<{product-very-short}_HOST>/api/mcp-actions/v1
9193
----
92-
9394
where:
95+
9496
`model-context-protocol`:: This is the tool runtime provider defined and configured in the llama-stack `run.yaml` configuration for use in LCS.
9597

9698
.. Optional: If you want to use your own Llama Stack configuration, add the following code to your Llama Stack configuration file (`run.yaml`).
@@ -103,7 +105,7 @@ providers:
103105
provider_type: remote::model-context-protocol
104106
config: {}
105107
----
106-
.. To authorize requests to the MCP endpoint using `<MCP_TOKEN>`, add it in the `{ls-short} app-config.yaml` file, to make POST requests to the LCS `/v1/streaming_query` endpoint, as shown in the following code:
108+
.. To authorize requests to the MCP endpoint using `<MCP_TOKEN>`, add it in the {ls-short} {my-app-config-file}` file, to make POST requests to the LCS `/v1/streaming_query` endpoint, as shown in the following code:
107109
+
108110
[source,yaml]
109111
----
@@ -117,14 +119,12 @@ lightspeed:
117119
[source,yaml]
118120
----
119121
curl -X POST \
120-
-H 'Content-Type: application/json' \
121-
-H 'MCP-HEADERS: {"mcp::backstage": {"Authorization": "Bearer <MCP_TOKEN>"}}' \
122-
-d '{"query": "Can you give me all catalog templates of type 'service', "model": "gpt-4o-mini", "provider": "openai"}' \
122+
-H `Content-Type: application/json` \
123+
-H `MCP-HEADERS: {"mcp::backstage": {"Authorization": "Bearer <MCP_TOKEN>"}}` \
124+
-d `{"query": "Can you give me all catalog templates of type 'service', "model": "gpt-4o-mini", "provider": "openai"}` \
123125
_<url>_/v1/streaming_query
124126
----
125127

126128
where:
127-
`<url>`:: Enter the LCS endpoint. You can use localhost(<{product-very-short}_servicename>.<{product-very-short}-namespace>.svc.cluster.local:8080) or the service name for this field if you are inside the {backstage} container.
128129

129-
where:
130-
`<url>`:: Specify the **LCS endpoint**. Use `localhost` (`127.0.0.1:8080`) or the service name if operating within the `{backstage}` container.
130+
`<url>`:: Enter the LCS endpoint. You can use localhost(<{product-very-short}_servicename>.<{product-very-short}-namespace>.svc.cluster.local:8080) or the service name for this field if you are inside the {backstage} container.

modules/model-context-protocol-tools/proc-configuring-model-context-protocol.adoc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ You can enable your AI client applications to access {product-very-short} inform
1111

1212
.Procedure
1313

14-
. In your `{product} app-config.yaml` file, configure a static token for authentication against the MCP server endpoint. MCP clients (such as `Cursor`, `Continue`, or `Lightspeed Core`) use these tokens to authenticate against the {backstage} MCP server. For example:
14+
. In your {product} {my-app-config-file}` file, configure a static token for authentication against the MCP server endpoint. MCP clients (such as `Cursor`, `Continue`, or `Lightspeed Core`) use these tokens to authenticate against the {backstage} MCP server. For example:
1515
+
1616
[source,yaml]
1717
----
@@ -23,38 +23,38 @@ backend:
2323
token: ${MCP_TOKEN}
2424
subject: mcp-clients
2525
----
26-
+
2726
where:
28-
`${MCP_TOKEN}`:: Set the token value that you generate.
2927

28+
`${MCP_TOKEN}`:: Set the token value that you generate.
29+
+
3030
[NOTE]
3131
====
3232
Tokens must be long and complex strings without whitespace to prevent brute-force guessing.
3333
3434
To generate a sample token, use the following command:
3535
[source,bash]
3636
----
37-
node -p 'require("crypto").randomBytes(24).toString("base64")'
37+
node -p `require("crypto").randomBytes(24).toString("base64")`
3838
----
3939
====
4040

4141
. Register the MCP tools that you install as a plugin source, as shown in the following example:
4242
+
43-
[source,yaml]
43+
[source,yaml,subs="+attributes,+quotes"]
4444
----
4545
backend:
4646
actions:
4747
pluginSources:
4848
- software-catalog-mcp-tool
4949
- techdocs-mcp-tool
5050
----
51-
52-
.`app-config.yaml` file with MCP configuration example
53-
[source,yaml]
51+
+
52+
.`{my-app-config-file}` file with MCP configuration example
53+
[source,yaml,subs="+attributes,+quotes"]
5454
----
5555
app:
5656
title: AI Dev Developer Hub
57-
baseUrl: "${RHDH_BASE_URL}"
57+
baseUrl: "${{product-very-short}_BASE_URL}"
5858
auth:
5959
environment: development
6060
session:
@@ -75,8 +75,8 @@ backend:
7575
subject: mcp-clients
7676
keys:
7777
- secret: "${BACKEND_SECRET}"
78-
baseUrl: "${RHDH_BASE_URL}"
78+
baseUrl: "${{product-very-short}_BASE_URL}"
7979
cors:
80-
origin: "${RHDH_BASE_URL}"
80+
origin: "${{product-very-short}_BASE_URL}"
8181
signInPage: oidc
8282
----

modules/model-context-protocol-tools/proc-finding-a-specific-techdoc-using-retrieve-techdocs-content.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[id="proc-finding-a-specific-techdoc-using-retrieve-techdocs-content_{context}"]
44
= Finding a specific TechDoc using `retrieve-techdocs-content`
55

6-
The `retrieve-techdocs-content` TechDocs MCP tool retrieves the content of a TechDocs resource, enabling AI clients to access documentation content for specific Software Catalog entities. By default, the tool returns a JSON entity with the following fields: 'entityRef', 'name', 'title', 'kind', 'namespace', 'content', 'path', 'contentType', 'lastModified', and 'metadata'.
6+
The `retrieve-techdocs-content` TechDocs MCP tool retrieves the content of a TechDocs resource, enabling AI clients to access documentation content for specific Software Catalog entities. By default, the tool returns a JSON entity with the following fields: `entityRef`, `name`, `title`, `kind`, `namespace`, `content`, `path`, `contentType`, `lastModified`, and `metadata`.
77

88
The following examples show common queries:
99

modules/model-context-protocol-tools/proc-installing-the-mcp-server-and-tool-plugins.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
To enable MCP support in {product}, you need to install the following components:
77

8-
* Backend MCP server plugin: Runs the MCP tools.
9-
* MCP tool plugins: Facilitates integration with the Software Catalog and TechDocs.
8+
Backend MCP server plugin:: Runs the MCP tools.
9+
MCP tool plugins:: Facilitates integration with the Software Catalog and TechDocs.
1010

1111
.Prerequisites
1212

modules/model-context-protocol-tools/proc-measuring-doc-gaps-using-analyze-techdocs-coverage.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[id="proc-measuring-doc-gaps-using-analyze-techdocs-coverage_{context}"]
44
= Measuring documentation gaps using `analyze-techdocs-coverage`
55

6-
The `analyze-techdocs-coverage` TechDocs MCP tool calculates the percentage of entities that have TechDocs configured, helping identify documentation gaps and improve overall documentation coverage. This tool supports filtering by entity type, namespace, owner, lifecycle, and tags to analyze coverage for specific subsets of entities. By default, it returns a JSON entity that includes the fields 'totalEntities', 'entitiesWithDocs', and 'coveragePercentage'.
6+
The `analyze-techdocs-coverage` TechDocs MCP tool calculates the percentage of entities that have TechDocs configured. This tool identifies documentation gaps and improve overall documentation coverage. This tool supports filtering by entity type, namespace, owner, lifecycle, and tags to analyze coverage for specific subsets of entities. By default, it returns a JSON entity that includes the fields `totalEntities`, `entitiesWithDocs`, and `coveragePercentage`.
77

88
The following examples show common queries:
99

0 commit comments

Comments
 (0)