name: create-crud-mcp-profile description: Create a new CRUD MCP profile from an OpenAPI spec in this repository. Use when a user asks for a profile equivalent to existing CRUD-style profiles (for example YouTrack, Grafana, GitLab, GitHub Security), including action mapping, parameter modeling, profile tests, docs updates, and validation.
CRUD MCP Profile Builder
Build a production-ready profile in profiles/<api>/ without rediscovering repository conventions.
Load This Context First
Read only these sources first, in this order:
AGENTS.md(canonical rules and workflow constraints)IMPLEMENTATION.md(architecture intent)docs/PROFILE-GUIDE.md(profile structure and patterns)docs/PROFILE-TEST-GUIDE.md(schema-driven tests)- A strong local reference profile:
profiles/youtrack/profile.jsonfor CRUD grouping styleprofiles/github-security/profile.jsonfor compact two-tool pattern
- Target spec and folder:
profiles/<api>/openapi.*or equivalent file present in folder
Then inspect only relevant docs for updates:
README.mdprofile lists/sectionsCHANGELOG.md([Unreleased])TODO.mdonly if you are implementing an existing backlog item
For repeatable command snippets, use references/discovery-and-validation.md.
Expected Output
Create or update these files:
profiles/<api>/profile.jsonprofiles/<api>/profile.test.jsonREADME.md(profile list and profiles section)CHANGELOG.md(single-line user-facing entry inUnreleased)
Optional:
- Fix invalid OpenAPI syntax in the bundled spec if parser/validator fails (for example invalid
itemsshape).
Workflow
- Inventory the target spec.
- Build operation map from
operationId+ HTTP method + path. - Decide CRUD grouping based on available methods:
retrieve_contentfor GET-like readscreate_contentfor POST createsupdate_contentfor PATCH/PUT/POST updatesdelete_contentfor DELETE removes- If API is read-heavy, keep only meaningful groups (do not add empty tools).
- Define action names that are explicit and stable (for example
list_*,get_*,create_*,update_*,delete_*). - Generate parameter model from OpenAPI:
required: truefor parameters required by all actions in a toolrequired_forfor action-specific required parameters- include useful optional filters
- add
parameter_aliasesfor common ergonomic names (owner,repo,project_id, etc.)
- Set interceptors:
- bearer auth with API-specific env var name (for example
CODECOV_TOKEN) - base URL env var + sane default when known
- retry policy aligned with existing profiles when applicable
- bearer auth with API-specific env var name (for example
- Build
profile.test.jsonwith schema-driven scenarios:- one scenario per action minimum
coverage.require_all_actions: true- add request assertions when behavior is non-trivial (aliases, metadata params, response field forwarding, proxy download)
- Validate and test.
- Update docs (
README.md,CHANGELOG.md).
Decision Rules
- Prefer consistency with existing repository profile style over inventing new naming conventions.
- Do not force full CRUD when the API does not provide full CRUD endpoints.
- Keep
metadata_paramsminimal. Do not mark parameters as metadata if they must be forwarded as query/body in any action. - If a parameter name is reused in multiple locations (for example
pathas both path and query parameter), avoid metadata suppression that would break query forwarding. - Keep descriptions practical for model usage, not API-spec copy-paste.
Validation Gate (Definition of Done)
Run all of the following:
npm run validate -- profiles/<api>/profile.json profiles/<api>/<spec-file>npm run test:unit -- src/testing/generic-profile.test.tsnpm run typecheck
If profile-only work is large, suggest (not force):
npm audit
Failure Handling
- If validator fails due to malformed bundled spec, fix the spec in place with minimal safe change and rerun validation.
- If test coverage fails, add missing action scenario rather than weakening coverage.
- If operation mapping is ambiguous, inspect the OpenAPI path+method block directly and prefer explicit action naming.
Completion Output Pattern
Report:
- Files created/updated
- CRUD coverage summary (tool count + action count)
- Validation/test/typecheck results
- Proposed Conventional Commit message