Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

mcp-schema-authoring

/mcp-schema-authoring

Zmienia kontrakt istniejącego narzędzia MCP: parametr, jego opis w .describe(), opis narzędzia, schemat wyjścia lub tekst zasobu przeglądowego, także gdy schemat rozjeżdża się z kodem.

Repozytorium
tearags-mcp ↗
Licencja
MIT
Ostatnia zmiana repozytorium
18.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 18.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Zmienia kontrakt istniejącego narzędzia MCP: parametr, jego opis w .describe(), opis narzędzia, schemat wyjścia lub tekst zasobu przeglądowego, także gdy schemat rozjeżdża się z kodem.

Wyzwalacze z opisu

change the X paramfix the tool descriptionadd a filter to semantic_searchthe schema says Y but the code does Zshrink tools/listпоправь описание параметрасхема MCP
Oryginalny opis (EN)

Change an EXISTING MCP tool's contract — a param, its .describe() hint, the tool description, an output schema, or the overview resource prose. Triggers on "change the X param", "fix the tool description", "add a filter to semantic_search", "the schema says Y but the code does Z", "shrink tools/list", "поправь описание параметра", "схема MCP". For a brand-new tool use add-mcp-endpoint instead.

Jak działa

  1. Implementation Checklist (in order)
  2. 1. Trace what the code actually does
  3. 2. Pin the contract red-first
  4. 3. Edit
  5. 4. Guards
  6. 5. Measure and commit
  7. Anti-patterns (each shipped once)
Sekcje z nagłówków SKILL.md, w oryginale · 94 linii, 599 słów
Podgląd SKILL.md
---
name: mcp-schema-authoring
description:
  Change an EXISTING MCP tool's contract — a param, its .describe() hint, the
  tool description, an output schema, or the overview resource prose. Triggers
  on "change the X param", "fix the tool description", "add a filter to
  semantic_search", "the schema says Y but the code does Z", "shrink
  tools/list", "поправь описание параметра", "схема MCP". For a brand-new tool
  use add-mcp-endpoint instead.
---

# MCP Schema Authoring

Invariants live in `.claude/rules/mcp-tool-schemas.md` — read it first; this
skill is the order of work. Prose style: `.claude/rules/caveman-compression.md`.

## Implementation Checklist (in order)

- [ ] Baseline: `npx tsx scripts/measure-tools-list.ts --per-tool` → save bytes
- [ ] Trace the code path FIRST (step 1) — the schema follows the code
- [ ] Red test pinning the contract you are about to state (step 2)
- [ ] Edit schema / hint / output schema (step 3)
- [ ] Guards green (step 4)
- [ ] Re-measure, commit with before → after bytes (step 5)

🛑 Each row is a gate.

## 1. Trace what the code actually does

For every param or response field you touch, answer from code, not from the
existing prose (the prose is what drifted):

| Question                                                   | Where to look                                                                               |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| Is the param applied in EVERY composition that exposes it? | `SchemaBuilder#filterParamNames`, `TrajectoryRegistry#buildFilter`, the handler             |
| What is the real default?                                  | the constant the handler / facade reads — interpolate it into the hint                      |
| What shape does the response carry?                        | `contracts/types/*` (e.g. `RankingOverlay`), `filterMetaOnly`, the strategy's `postProcess` |
| Does the shape change with `metaOnly` / `fields` / preset? | `explore/post-process.ts`, `BaseExploreStrategy#applyMetaOnly`                              |

Use `find_symbol` / `get_callers` on the handler, never grep the prose.

## 2. Pin the contract red-first

Pick the guard that owns the invariant:

| Contract                          | Test file                                      |
| --------------------------------- | ---------------------------------------------- |
| param exposed ⇔ applied           | `tests/mcp/tools/param-applicability.test.ts`  |
| hint ≤ 20 words (real tools/list) | same file (`MAX_PARAM_HINT_WORDS`)             |
| input schema shape / enums        | `tests/mcp/tools/schemas.test.ts`              |
| output shape vs REAL results      | `tests/mcp/tools/output-schemas.test.ts`       |
| payload/overlay shape per mode    | `tests/core/domains/explore/**` strategy tests |

Output-schema tests parse results produced by the real code (`Reranker#rerank`,
`resolveSymbols`, `CodeChunkGrouper.groupMembers`), never a fixture written in
the shape you wish the tool returned. Changing an existing expectation =
intentional invariant change: say so in the commit (`test-invariants.md` rule
4).

## 3. Edit

- Hint: ≤ 20 words, the one thing an agent would get wrong. Everything else →
  `buildOverview` `## Param reference` in `src/mcp/resources/registry.ts`, and
  the tool description links `tea-rags://schema/overview`.
- Shared wording across tools → one exported constant (`META_ONLY_CONTRACT`).
- Dynamic param sets (filters, presets) → from `SchemaBuilder`, never a literal
  list.
- Output schema → mirror the contracts type; `.passthrough()` only on a
  runtime-keyed bag, documented in prose.
- A response shape change is `BREAKING CHANGE` in the commit footer.

## 4. Guards

```bash
npx tsc --noEmit
npx vitest run --maxWorkers=2 tests/mcp tests/core/api/internal/infra tests/core/domains/explore
```

Plugin rules/skills that referenced the old wording → update them to POINT at
the schema/overview (not restate), bump plugin version, and check
`scripts/inject-rules.sh --count` against the declared `--parts`.

## 5. Measure and commit

```bash
npx tsx scripts/measure-tools-list.ts --per-tool
```

Commit body: what contract changed, which code path proves it, `tools/list`
bytes codegraph ON/OFF before → after. Live check needs the server to load the
new build — ask the user before `npm link` (it is machine-wide), then exercise
the tool via MCP.

## Anti-patterns (each shipped once)

- Listing a filter the active composition never applies (86wsz).
- A 300-char `level` / `project` hint that belonged in the overview (ewg2s).
- A hint stating a default the handler does not use (search_code `limit`).
- An output schema declaring item fields no tool emits, hidden by
  `.passthrough()` (nb32e).
- `{value,label}` objects at a payload path that holds a number without
  `metaOnly` (9506eb2b6).
- The same contract paragraph copy-pasted into five tools, drifting apart.

Wersje

W bazie nie ma innych skilli o nazwie mcp-schema-authoring.

Migawka bazy z 13.11.2026 · wersja paczki c980dd083ac3 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 4 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100add-mcp-endpoint
    Udostępnia nowe narzędzie klientom LLM przez protokół MCP w jednej skoordynowanej zmianie: schemat, handler, metoda App i dokumentacja.
  • 91add-tool
    Tworzy szkielet nowej definicji narzędzia MCP, gdy użytkownik chce dodać możliwość do serwera.
  • 96add-tool
    Dodaje narzędzie do serwera MCP wraz ze schematami zod, opisem dla modelu, obsługą błędów i testami przez prawdziwego klienta MCP.
  • 100atomr-agents-tools
    Pomaga pisać lub zmieniać narzędzie Tool lub RichTool: schemat ToolDescriptor, ToolReturn Command, podłączenie do ToolStrategy agenta i wbudowane narzędzia HandoffTool.
  • 100edt-mcp-tool-conventions
    Pilnuje spójności narzędzi EDT-MCP: nazewnictwa parametrów, kształtu błędów, formatu wyjścia, paginacji, semantyki braku zasobu i zgodności schematu z README.
  • 100actor-tool-registration
    Rejestruje narzędzie aktora w rejestrze narzędzi: dodaje ToolId i GetToolDefinition oraz udostępnia schemat narzędzia.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.