You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**mcp/** - MCP server for semantic search over notification templates (separate subproject with own CLAUDE.md)
41
+
-**mcp/** - MCP server for semantic search over notification templates
42
+
(separate subproject with own CLAUDE.md)
38
43
-**scripts/** - Validation scripts
39
44
40
45
### Notification Template Structure
@@ -54,43 +59,58 @@ Each notification is a JSON file with required fields:
54
59
```
55
60
56
61
**Key constraints:**
62
+
57
63
-`description` field MUST end with a period (enforced by `make validate`)
58
-
-`severity` must be one of: Debug, Info, Warning, Major, Critical (enforced by `scripts/checkseverity.sh`)
59
-
- Templates may contain variable placeholders like `${TIME}`, `${CLUSTER_ID}`, `${NAMESPACE}`
64
+
-`severity` must be one of: Debug, Info, Warning, Major, Critical
65
+
(enforced by `scripts/checkseverity.sh`)
66
+
- Templates may contain variable placeholders like `${TIME}`, `${CLUSTER_ID}`,
67
+
`${NAMESPACE}`
60
68
61
69
### Posting Notifications
62
70
63
-
Notifications are posted via the [OpenShift Service Logs API](https://api.openshift.com/?urls.primaryName=Service%20logs#/default/post_api_service_logs_v1_cluster_logs) using `osdctl`:
71
+
Notifications are posted via the
72
+
[OpenShift Service Logs API](https://api.openshift.com/?urls.primaryName=Service%20logs#/default/post_api_service_logs_v1_cluster_logs)
73
+
using `osdctl`:
64
74
65
75
```bash
66
76
osdctl servicelog post <cluster-uuid> -t <template-url>
67
77
```
68
78
69
79
Example:
80
+
70
81
```bash
71
82
osdctl servicelog post aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee \
Some templates include a `_tag` field for categorization (e.g., `t_network` for network-related issues). Search GitHub with these tags to find related templates.
89
+
Some templates include a `_tag` field for categorization (e.g., `t_network`
90
+
for network-related issues). Search GitHub with these tags to find related
91
+
templates.
78
92
79
93
## MCP Server Subproject
80
94
81
-
The `mcp/` directory contains a standalone MCP (Model Context Protocol) server that provides semantic search over these notification templates using vector embeddings. This subproject:
95
+
The `mcp/` directory contains a standalone MCP (Model Context Protocol) server
96
+
that provides semantic search over these notification templates using vector
97
+
embeddings. This subproject:
82
98
83
-
- Has its own `mcp/CLAUDE.md` with detailed architecture and development instructions
99
+
- Has its own `mcp/CLAUDE.md` with detailed architecture and development
100
+
instructions
84
101
- Uses Python + uv for dependency management
85
102
- Builds ChromaDB vector database from notification templates
86
103
- Exposes MCP tools for AI-powered notification search
87
104
88
-
When working on the MCP server, refer to `mcp/CLAUDE.md` for specific guidance.
105
+
When working on the MCP server, refer to `mcp/CLAUDE.md` for specific
106
+
guidance.
89
107
90
108
## Validation Scripts
91
109
92
-
**scripts/checklinks.sh** - Validates all HTTP/HTTPS URLs in templates return 200 (not 404)
110
+
**scripts/checklinks.sh** - Validates all HTTP/HTTPS URLs in templates return
111
+
200 (not 404)
93
112
94
-
**scripts/checkseverity.sh** - Ensures all templates have valid severity values
113
+
**scripts/checkseverity.sh** - Ensures all templates have valid severity
114
+
values
95
115
96
116
These run in CI and should pass before merging changes.
Note: `Osdctl` supports the usage of the unique cluster name, or the internal- and external ID as clusterID.
35
+
Note: `Osdctl` supports the usage of the unique cluster name, or the
36
+
internal- and external ID as clusterID.
32
37
33
38
### Tags
39
+
34
40
Some template files have a `_tag` field for easier searching.
35
41
36
-
For example, in GitHub, searching `t_network` will show you all the network related template files.
42
+
For example, in GitHub, searching `t_network` will show you all the network
43
+
related template files.
37
44
38
45
## MCP Search Server
39
46
40
-
This repository includes an MCP (Model Context Protocol) server that provides semantic search capabilities over the notification templates. See [mcp/README.md](mcp/README.md) for setup and usage instructions.
47
+
This repository includes an MCP (Model Context Protocol) server that provides
48
+
semantic search capabilities over the notification templates. See
49
+
[mcp/README.md](mcp/README.md) for setup and usage instructions.
41
50
42
51
## Validating Managed Notifications
43
52
44
-
Run `make validate` to perform basic validations against the notifications configured in this repo.
53
+
Run `make validate` to perform basic validations against the notifications
Copy file name to clipboardExpand all lines: mcp/CLAUDE.md
+36-14Lines changed: 36 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,12 @@
1
1
# CLAUDE.md
2
2
3
-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
3
+
This file provides guidance to Claude Code (claude.ai/code) when working with
4
+
code in this repository.
4
5
5
6
## Essential Commands
6
7
7
8
**Development:**
9
+
8
10
```bash
9
11
# Install dependencies
10
12
uv sync
@@ -30,44 +32,64 @@ podman run -p 8000:8000 managed-notifications-search
30
32
31
33
## Architecture Overview
32
34
33
-
This is an MCP (Model Context Protocol) server that provides semantic search over OpenShift service notification logs using vector embeddings. The system has two main phases:
35
+
This is an MCP (Model Context Protocol) server that provides semantic search
36
+
over OpenShift service notification logs using vector embeddings. The system
37
+
has two main phases:
34
38
35
39
### Build Phase (Offline)
40
+
36
41
-**Input**: JSON notification files from `managed-notifications/` directory
37
-
-**Processing**: `scripts/build_embeddings.py` extracts searchable text, creates embeddings via sentence-transformers, stores in ChromaDB
**MCP Configuration**: `mcp-config.json` provides ready-to-use HTTP transport config for MCP clients connecting to `localhost:8000/mcp`.
80
+
**MCP Configuration**: `mcp-config.json` provides ready-to-use HTTP transport
81
+
config for MCP clients connecting to `localhost:8000/mcp`.
64
82
65
83
## Environment Variables
66
84
67
-
-`EMBEDDING_MODEL`: Override default sentence transformer model (default: "all-MiniLM-L6-v2")
85
+
-`EMBEDDING_MODEL`: Override default sentence transformer model
86
+
(default: "all-MiniLM-L6-v2")
68
87
-`HOST`: Server bind address (default: "127.0.0.1", container uses "0.0.0.0")
69
88
-`PORT`: Server port (default: "8000")
70
89
71
90
## Database Dependencies
72
91
73
-
The MCP server requires the ChromaDB database to exist before startup. Always run `uv run build-embeddings` before `uv run serve` in fresh environments. The embeddings script includes a test search for "missing or insufficient permissions" to validate the database.
92
+
The MCP server requires the ChromaDB database to exist before startup. Always
93
+
run `uv run build-embeddings` before `uv run serve` in fresh environments. The
94
+
embeddings script includes a test search for "missing or insufficient
0 commit comments