Skip to content

Commit 124f41e

Browse files
authored
refactor(docs): migrate to ai-helpers (#125)
* build, remove documentation files in publish * documentation, migrate to ai-helpers, remove files * options.defaults, move from docPath to docPaths local dir listing * server.getResources, loop for docPaths, error callout * e2e, annotation from local reference to fixture
1 parent 4492355 commit 124f41e

38 files changed

Lines changed: 223 additions & 4050 deletions

docs/development.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ npx @modelcontextprotocol/inspector-cli \
7979
--cli \
8080
--method tools/call \
8181
--tool-name usePatternFlyDocs \
82-
--tool-arg urlList='["documentation/guidelines/README.md"]'
82+
--tool-arg name="Button"
8383
```
8484

8585
## Programmatic usage
@@ -88,21 +88,21 @@ npx @modelcontextprotocol/inspector-cli \
8888

8989
The `start()` function accepts an optional `PfMcpOptions` object for programmatic configuration. Use these options to customize behavior, transport, and logging for embedded instances.
9090

91-
| Option | Type | Description | Default |
92-
|:---------------------------|:-----------------------------------------|:----------------------------------------------------------------------|:-------------------|
93-
| `toolModules` | `ToolModule \| ToolModule[]` | Array of tool modules or paths to external tool plugins to be loaded. | `[]` |
94-
| `isHttp` | `boolean` | Enable HTTP transport mode. | `false` |
95-
| `http.port` | `number` | Port for HTTP transport. | `8080` |
96-
| `http.host` | `string` | Host to bind to. | `127.0.0.1` |
97-
| `http.allowedOrigins` | `string[]` | List of allowed CORS origins. | `[]` |
98-
| `http.allowedHosts` | `string[]` | List of allowed host headers. | `[]` |
99-
| `pluginIsolation` | `'none' \| 'strict'` | Isolation preset for external tools-as-plugins. | `'strict'` |
100-
| `logging.level` | `'debug' \| 'info' \| 'warn' \| 'error'` | Set the logging level. | `'info'` |
101-
| `logging.stderr` | `boolean` | Enable terminal logging to stderr. | `false` |
102-
| `logging.protocol` | `boolean` | Forward logs to MCP clients. | `false` |
103-
| `mode` | `'cli' \| 'programmatic' \| 'test'` | Specifies the operation mode. | `'programmatic'` |
104-
| `modeOptions.test.baseUrl` | `string` | Base URL for fixture/mock servers in `test` mode. | `undefined` |
105-
| `docsPath` | `string` | Path to the documentation directory. | (Internal default) |
91+
| Option | Type | Description | Default |
92+
|:---------------------------|:-----------------------------------------|:---------------------------------------------------------------------------------------------------------------------------|:-----------------|
93+
| `toolModules` | `ToolModule \| ToolModule[]` | Array of tool modules or paths to external tool plugins to be loaded. | `[]` |
94+
| `isHttp` | `boolean` | Enable HTTP transport mode. | `false` |
95+
| `http.port` | `number` | Port for HTTP transport. | `8080` |
96+
| `http.host` | `string` | Host to bind to. | `127.0.0.1` |
97+
| `http.allowedOrigins` | `string[]` | List of allowed CORS origins. | `[]` |
98+
| `http.allowedHosts` | `string[]` | List of allowed host headers. | `[]` |
99+
| `pluginIsolation` | `'none' \| 'strict'` | Isolation preset for external tools-as-plugins. | `'strict'` |
100+
| `logging.level` | `'debug' \| 'info' \| 'warn' \| 'error'` | Set the logging level. | `'info'` |
101+
| `logging.stderr` | `boolean` | Enable terminal logging to stderr. | `false` |
102+
| `logging.protocol` | `boolean` | Forward logs to MCP clients. | `false` |
103+
| `mode` | `'cli' \| 'programmatic' \| 'test'` | Specifies the operation mode. | `'programmatic'` |
104+
| `modeOptions.test.baseUrl` | `string` | Base URL for fixture/mock servers in `test` mode. | `undefined` |
105+
| `docsPaths` | `string[]` | Whitelist of local documentation directories resolved by `documentation:` slug. When empty (default), the slug is dormant. | `[]` |
106106

107107
#### Example usage
108108

@@ -124,6 +124,10 @@ const options: PfMcpOptions = {
124124
const server: PfMcpInstance = await start(options);
125125
```
126126

127+
#### About pinned documentation sources
128+
129+
The documentation catalog `src/docs.json` pins remote resources to specific commit SHAs (or explicit refs) for stability and reproducibility. This avoids unexpected upstream changes from breaking results. The `searchPatternFlyDocs` tool handles these lookups transparently for the user.
130+
127131
**Example: Programmatic test mode**
128132
```typescript
129133
import { start, type PfMcpInstance } from '@patternfly/patternfly-mcp';

documentation/README.md

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)