Commit 8d05ef19 authored by Jan Reimes's avatar Jan Reimes
Browse files

docs(cli): update SKILL.md for cli-teddi commands and usage



* Refine command descriptions for `teddi-cli` operations.
* Remove references to server mode and clarify usage.
* Update command examples for consistency and accuracy.
* Enhance troubleshooting section for better clarity.

Co-authored-by: default avatarCopilot <copilot@github.com>
parent 34c31f00
Loading
Loading
Loading
Loading
+29 −61
Original line number Diff line number Diff line
______________________________________________________________________
---
name: cli-teddi
description: CLI usage for teddi-cli from source in this repository. Use when running TEDDI term searches and listing technical bodies from terminal with uv run commands.
---

## name: cli-teddi description: CLI usage for teddi-mcp from source in this repository. Use when running TEDDI term searches, listing technical bodies, or starting the TEDDI MCP server from terminal with uv run commands.

# CLI: teddi-mcp
# CLI: teddi-cli

## Overview

Use the teddi CLI for scripted or terminal-based TEDDI operations:
Use `teddi-cli` for scripted or terminal-based TEDDI operations:

- search terms and definitions,
- list available technical bodies,
- start the MCP server over stdio.
- list available technical bodies.

Note: `teddi-cli` is search-only. Start server mode with `teddi-mcp` (or `teddi server`).

Always run through uv.
All commands in this file must be run through uv.

## Commands

### Search a term

```bash
uv run teddi-mcp search term HATS
uv run teddi-cli term HATS
```

### Search with filters

```bash
uv run teddi-mcp search term HATS \
  --search-in both \
  --search-pattern exactmatch \
uv run teddi-cli term HATS \
  --scope both \
  --pattern exactmatch \
  --technical-bodies 3gpp,itu,stq
```

### List technical bodies

```bash
uv run teddi-mcp search list-bodies
uv run teddi-cli list-bodies
```

### Machine-readable output

```bash
uv run teddi-mcp search term HATS --output json
uv run teddi-mcp search term HATS --output ison
uv run teddi-mcp search term HATS --output toon
```

### Run server mode

```bash
uv run -m teddi_mcp
```

### Search with filters

```bash
uv run teddi-mcp search term HATS \
  --search-in both \
  --search-pattern exactmatch \
  --technical-bodies 3gpp,itu,stq
uv run teddi-cli term HATS --output <format>
```

### List technical bodies
Supported `<format>` values: `table`, `json`, `ison`, `toon`.

```bash
uv run teddi-mcp search list-bodies
```

### Machine-readable output

```bash
uv run teddi-mcp search term HATS --output json
uv run teddi-mcp search term HATS --output ison
uv run teddi-mcp search term HATS --output toon
```

### Run server mode
## Arguments Reference

```bash
uv run -m teddi_mcp
```
- Search scope: `--scope` = `abbreviations` | `definitions` | `both`
- Match behavior: `--pattern` = `exactmatch` | `startingwith` | `endingwith` | `alloccurrences`
- Body filter: `--technical-bodies` = comma-separated codes such as `3gpp,stq`
- Output format: `--output` = `table` | `json` | `ison` | `toon`

## Arguments Reference
Common combinations:

- `--search-in`: `abbreviations`, `definitions`, `both`
- `--search-pattern`: `exactmatch`, `startingwith`, `endingwith`, `alloccurrences`
- `--technical-bodies`: comma-separated codes such as `3gpp,stq`
- `--output`: `table`, `json`, `ison`, `toon`
- Broad search: `--scope both --pattern alloccurrences`
- Strict search: `--scope both --pattern exactmatch`
- Filtered JSON: `--scope both --pattern exactmatch --technical-bodies 3gpp,stq --output json`

## Troubleshooting

If a technical body is reported unknown:

1. Run `search list-bodies` and use returned codes exactly.
1. Retry with normalized lowercase codes.
1. Run `list-bodies` and use returned codes exactly.
2. Retry with normalized lowercase codes.

If exact match returns no rows:

1. Retry using uppercase term.
1. Retry with `--search-pattern alloccurrences`.

If server tools do not refresh after code changes:

1. Reload VS Code window.
1. Re-run the configured MCP command from `.vscode/mcp.json`.
2. Retry with `--pattern alloccurrences`.
+50 −18
Original line number Diff line number Diff line
______________________________________________________________________

## name: mcp-teddi description: MCP usage for ETSI TEDDI (Terms and Definitions Database Interactive) through the teddi-mcp server. Use when querying terms/abbreviations, listing technical bodies, validating technical body codes, or retrieving exact term definitions from Copilot chat tools.
---
name: mcp-teddi
description: MCP usage for ETSI TEDDI (Terms and Definitions Database Interactive) through the teddi-mcp server. Use when querying terms/abbreviations, listing technical bodies, validating technical body codes, or retrieving exact term definitions from Copilot chat tools.
---

# MCP Server: TEDDI

@@ -18,17 +19,49 @@ Important behavior:

Use these teddi MCP tools:

- `mcp_teddi-mcp_search_teddi`
- `mcp_teddi-mcp_get_term_info`
- `mcp_teddi-mcp_list_technical_bodies`
- `search_teddi`
- `get_term_info`
- `list_technical_bodies`

Depending on the MCP client, tool names may be displayed with a server prefix (for example, `mcp_teddi-mcp_search_teddi`).

## Tool Details

### `list_technical_bodies`

- Purpose: return supported values for `technical_bodies` filtering.
- Arguments: none.
- Returns: object with `technical_bodies` list.

### `search_teddi`

- Purpose: general TEDDI search with explicit scope/pattern controls.
- Arguments:
  - `term` (required string)
  - `search_in` (optional string): `abbreviations` | `definitions` | `both` (default `both`)
  - `search_pattern` (optional string): `exactmatch` | `startingwith` | `endingwith` | `alloccurrences` (default `alloccurrences`)
  - `technical_bodies` (optional comma-separated string)
- Returns: object with:
  - `query` (normalized request values)
  - `total_count`
  - `results[]` with `term`, `description`, and `documents[]` (`technical_body`, `specification`, `url`)

### `get_term_info`

- Purpose: convenience lookup for exact-match term retrieval.
- Arguments:
  - `term` (required string)
  - `technical_bodies` (optional comma-separated string)
- Behavior: internally uses `search_in="both"` and `search_pattern="exactmatch"`.
- Returns: same structure as `search_teddi`, plus `exact_match` boolean.

## Recommended Workflow

1. Validate or discover technical body codes first with `list_technical_bodies`.
1. Run `search_teddi` with explicit `search_in` and `search_pattern`.
1. Apply `technical_bodies` filtering only with known valid codes.
1. If the user wants one specific entry, use `get_term_info` for exact lookup.
1. Summarize results with:
1. Step 1: Validate or discover technical body codes with `list_technical_bodies`.
2. Step 2: Run `search_teddi` with explicit `search_in` and `search_pattern`.
3. Step 3: Apply `technical_bodies` filtering only with known valid codes.
4. Step 4: If the user wants one specific entry, use `get_term_info` for exact lookup.
5. Step 5: Summarize results with:
   - concise definition,
   - body-specific differences,
   - document references (spec + URL) when available.
@@ -45,10 +78,9 @@ Use `search_teddi` with:

### Technical-body constrained search

Use comma-separated body codes, for example:
Use comma-separated body codes from `list_technical_bodies`, for example:

- `technical_bodies="3gpp,stq"`
- `technical_bodies="etsi,itu"`
- `technical_bodies="all"`

If a code is rejected, call `list_technical_bodies` and retry with valid codes.

@@ -62,7 +94,7 @@ When multiple results are returned:

When no results are returned:

- Retry with different casing (`HATS` vs `hats`).
- If no results are returned for a query, retry with different casing (for example, `HATS` vs `hats`).
- Retry with `alloccurrences`.
- Keep the same technical body filter unless the user asks to broaden scope.

@@ -71,6 +103,6 @@ When no results are returned:
For explanations, include:

1. A one-line plain-language meaning.
1. Context of use (for example, telecom testing, standards terminology).
1. Differences by technical body.
1. Optional references to source specs from TEDDI response data.
2. Context of use (for example, telecom testing, standards terminology).
3. Differences by technical body.
4. Optional references to source specs from TEDDI response data.