Skip to content

fix(codegen): emit @description in header JSDoc without categorization#122

Merged
bug-ops merged 1 commit into
masterfrom
fix/94-102-jsdoc-input-schema
Jul 9, 2026
Merged

fix(codegen): emit @description in header JSDoc without categorization#122
bug-ops merged 1 commit into
masterfrom
fix/94-102-jsdoc-input-schema

Conversation

@bug-ops

@bug-ops bug-ops commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

Test plan

  • cargo +nightly fmt --check
  • cargo +stable clippy --all-targets --all-features --workspace -- -D warnings
  • cargo nextest run --all-features --workspace --no-fail-fast (659/659 passed)
  • cargo test --doc --all-features --workspace
  • New unit tests: test_create_tool_context_without_categorization_falls_back_to_description, test_create_tool_context_input_schema_is_sanitized

Closes #94
Closes #102

create_tool_context() now falls back short_description to the tool's own
description when no LLM categorization is available, so the generated
header JSDoc always includes @description. Previously this tag was
omitted on the plain generate CLI path, causing the skill command to
fall back to uninformative "{tool_name} tool" placeholders in SKILL.md.

Also documents that ToolContext.input_schema always holds the
JSDoc-sanitized schema (already the case since PR #100) and adds a
regression test locking in that invariant.

Closes #94, closes #102
@github-actions github-actions Bot added area: codegen Code generation crate: mcp-codegen Changes to mcp-codegen crate (TypeScript code generation) type: documentation Documentation changes (*.md, docs/, comments) breaking change Contains breaking API changes (requires major version bump) release Release preparation (changelog, version bumps) labels Jul 9, 2026
@bug-ops
bug-ops enabled auto-merge (squash) July 9, 2026 14:31
@bug-ops
bug-ops merged commit 0aaa3a6 into master Jul 9, 2026
17 checks passed
@bug-ops
bug-ops deleted the fix/94-102-jsdoc-input-schema branch July 9, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: codegen Code generation breaking change Contains breaking API changes (requires major version bump) crate: mcp-codegen Changes to mcp-codegen crate (TypeScript code generation) release Release preparation (changelog, version bumps) type: documentation Documentation changes (*.md, docs/, comments)

Projects

None yet

1 participant