Skip to content

feat(mcp): name the package and version in docs and API results - #1895

Merged
kdinev merged 12 commits into
masterfrom
dkalinov/mcp-api-versions-1863
Nov 17, 2026
Merged

kdinev merged 12 commits into
masterfrom
dkalinov/mcp-api-versions-1863

Conversation

@dkalinovInfra

@dkalinovInfra dkalinovInfra commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Description

MCP answers looked the same for every release, so a caller could not tell which package version a doc or API entry described (#1863). This PR labels the answers and refreshes the data behind them.

Package and version in results

  • get_api_reference starts every response (full entry, one section, one member) with a Package: <name>@<version> line.
  • search_api tags each hit, e.g. **IgxPaginatorComponent** [angular] [class] [igniteui-angular@22.3].
  • get_doc adds a package line to the frontmatter, after component, in local mode only (see the notes below). It is derived by looking up the doc's listed components in the bundled API reference, each in the framework its prefix names, and is omitted when none of them is there.
  • The version is read from the Version: header of each bundled llms-full.txt. The header names the minor line (22.3), because a snapshot describes every patch of it; the folder keeps the full version it stands for (docs/angular-api/igniteui-angular/22.3.0/).
  • The label is therefore <package>@<major>.<minor>, with no patch number and no pre-release suffix.
  • When several packages ship the same name, the Package: line names the package the returned entry was read from, and an Also in: line lists the others, whose definition can differ (e.g. Package: IgniteUI.Blazor.Lite@1.0 / Also in: IgniteUI.Blazor@26.1).

Regenerated API reference snapshots (built from api-docs vnext)

Platform Before Now
Web Components latest (unversioned), 5 packages 16 packages: igniteui-webcomponents 7.5.0, -grids 7.4.0, igniteui-dockmanager 2.3.0, igniteui-grid-lite 0.12.0, charts/gauges/maps family 7.1.1
React 19.5.1, 3 packages 15 packages: igniteui-react, -grids, -dockmanager 19.11.0; charts/gauges/maps family 19.6.0
Blazor 25.1.x, 5 packages IgniteUI.Blazor + Documents.* 26.1.98, Lite 1.0.1, GridLite 1.0.0
Angular 22.2.0 / 22.0.0 igniteui-angular 22.3.0, the other 11 packages 22.0.1

The "Now" column is the version each snapshot stands for, which is also its folder name; results show only its major.minor part. Some of these releases are not on npm yet; see the review notes.

Related Issue

Closes #1863

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring / code cleanup
  • Build / CI configuration change

Affected Packages

  • igniteui-cli (packages/cli)
  • @igniteui/cli-core (packages/core)
  • @igniteui/angular-templates (packages/igx-templates)
  • @igniteui/angular-schematics (packages/ng-schematics)
  • @igniteui/mcp-server (packages/igniteui-mcp)

Checklist

  • I have tested my changes locally (npm run test)
  • I have built the project successfully (npm run build)
  • I have run the linter (npm run lint)
  • I have added/updated tests as needed
  • My changes do not introduce new warnings or errors

npm run test passes: lint with 0 errors, build, and 905 Jasmine specs with 0 failures (2 pending). The MCP server vitest suite also passes (470 tests), and the tools were called on the built server.

Additional Context

Sample output from the built server:

Package: igniteui-react-grids@19.11

IgrGridToolbarExporter.exportPDF (property):
- **exportPDF**: `boolean` — Show entry for PDF export.
component: IgcTabsComponent, IgcTabComponent, ...
package: igniteui-webcomponents@7.5

Notes for review:

  • The get_doc version is that of the bundled API reference, not of the doc text itself: docs carry no version, and the docs database was not rebuilt in this PR.
  • Web Components and React gain the charts, gauges, maps, excel and spreadsheet packages, which widens API coverage and grows the published package.
  • Several snapshots were built from pre-releases, because those packages publish their final versions after this CLI release: Angular 22.3.0-rc.0, React 19.11.0-rc.0, Web Components grids 7.4.0-beta.2 and charts family 7.1.1-beta.19. Their folders name the final release (22.3.0, 19.11.0, 7.4.0, 7.1.1) and their labels its minor line, so the content can differ slightly from the final build.
  • The 11 other Angular packages (charts, core, gauges, maps, excel, …) are the 22.0.1 release, the latest stable one; 22.0.2 exists only as an alpha.
  • The links inside the snapshots keep the API site's own URL segment (e.g. /igniteui-angular/22.3/, /igniteui-angular-charts/22.0.0/), which is not always the folder name.
  • The Web Components charts-family pre-release is not registered in api-docs; it was built with a local platforms-config.json edit.
  • Remote mode: get_doc is not labelled. The .NET backend returns the doc body without frontmatter, so there is no component line to look up. Labelling remote responses needs a backend change and is not in this PR. get_api_reference and search_api read the bundled data in both modes and are labelled in both.
  • Submodule pointers are not part of this PR. The snapshots were built with blazor/api-docs at 3cc39f1 (vnext), which is newer than the pinned commit.
  • Specification.md content changed; its Version/Date header may need a bump.

🤖 Generated with Claude Code

dkalinovInfra and others added 2 commits November 12, 2026 13:56
Web Components 7.4.1 (was an unversioned 'latest' snapshot), React 19.9.1,
Blazor 26.1.98 and Angular 22.2.6, built from api-docs vnext. Web Components
and React now also include the charts, gauges, maps, excel and spreadsheet
packages.

Refs #1863

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
get_api_reference starts every response with a 'Package: <name>@<version>'
line, search_api tags each hit with it, and get_doc adds a 'package' line to
the frontmatter for the components the doc lists. The version comes from the
'Version:' header of the bundled API snapshot.

Refs #1863

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 12, 2026 12:08
@coveralls

coveralls commented Nov 12, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 95.657%. remained the same — dkalinov/mcp-api-versions-1863 into master

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

API and search responses misattribute a selected symbol definition to packages with different APIs, while remote and cross-framework documentation responses omit package labels.

3 open issues
What changed in this PR

This PR adds package/version context to Ignite UI MCP documentation and API answers, addressing part of #1863. It also refreshes bundled API snapshots and expands React and Web Components coverage.

Changes:

  • Reads snapshot versions and adds package labels to API responses, search hits, and document frontmatter.
  • Updates bundled API references across all four frameworks.
  • Adds attribution tests and updates tool descriptions and documentation.
File Description
spec/​unit/​mcp-runtime-spec.ts Updates loader mocks and search-label assertions.
packages/​igniteui-mcp/​Specification.md Documents package/version output.
packages/​igniteui-mcp/​igniteui-doc-mcp/​src/​tools/​handlers.ts Labels API responses and search hits.
packages/​igniteui-mcp/​igniteui-doc-mcp/​src/​tools/​doc-tools.ts Adds package metadata to document frontmatter.
packages/​igniteui-mcp/​igniteui-doc-mcp/​src/​tools/​constants.ts Explains labels in tool descriptions.
packages/​igniteui-mcp/​igniteui-doc-mcp/​src/​lib/​types/​docs.types.ts Adds optional entry version metadata.
packages/​igniteui-mcp/​igniteui-doc-mcp/​src/​lib/​api-doc-loader.ts Reads snapshot versions and exposes package labels.
packages/​igniteui-mcp/​igniteui-doc-mcp/​src/​index.ts Connects document enrichment to the API loader.
packages/​igniteui-mcp/​igniteui-doc-mcp/​src/​__tests__/​tools/​handlers.test.ts Tests labels across API response formats.
packages/​igniteui-mcp/​igniteui-doc-mcp/​src/​__tests__/​tools/​doc-tools.test.ts Tests frontmatter enrichment and fallback behavior.
packages/​igniteui-mcp/​igniteui-doc-mcp/​src/​__tests__/​lib/​api-doc-loader.test.ts Tests version parsing and package/version pairing.
packages/​igniteui-mcp/​igniteui-doc-mcp/​README.md Updates public tool-output descriptions.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​webcomponents-api/​igniteui-webcomponents-spreadsheet-chart-adapter/​7.1.0/​llms-full.txt Adds spreadsheet chart adapter coverage.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​webcomponents-api/​igniteui-webcomponents-fdc3/​7.1.0/​llms-full.txt Adds FDC3 API coverage.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​webcomponents-api/​igniteui-webcomponents-datasources/​7.1.0/​llms-full.txt Adds data-source API coverage.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​webcomponents-api/​igniteui-webcomponents-dashboards/​7.1.0/​llms-full.txt Adds dashboard API coverage.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​webcomponents-api/​igniteui-grid-lite/​0.11.0/​llms-full.txt Versions and refreshes Grid Lite APIs.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​webcomponents-api/​igniteui-dockmanager/​2.2.1/​llms-full.txt Versions and refreshes Dock Manager APIs.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​react-api/​igniteui-react-spreadsheet-chart-adapter/​19.6.0/​llms-full.txt Adds React spreadsheet chart adapter coverage.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​react-api/​igniteui-react-fdc3/​19.6.0/​llms-full.txt Adds React FDC3 coverage.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​react-api/​igniteui-react-datasources/​19.6.0/​llms-full.txt Adds React data-source coverage.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​react-api/​igniteui-react-dashboards/​19.6.0/​llms-full.txt Adds React dashboard coverage.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​blazor-api/​IgniteUI.Blazor.GridLite/​25.1.x/​llms-full.txt Removes the older GridLite snapshot.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​blazor-api/​IgniteUI.Blazor.GridLite/​1.0.0/​llms-full.txt Adds the versioned GridLite replacement.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​blazor-api/​IgniteUI.Blazor.Documents.Core/​26.1.98/​llms-full.txt Refreshes Documents Core version and links.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​angular-api/​igniteui-angular-spreadsheet-chart-adapter/​22.0.0/​llms-full.txt Refreshes adapter data to 22.0.1; removes module/provider entries.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​angular-api/​igniteui-angular-inputs/​22.0.0/​llms-full.txt Refreshes inputs to 22.0.1; removes module/provider entries.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​angular-api/​igniteui-angular-gauges/​22.0.0/​llms-full.txt Refreshes gauges to 22.0.1; removes module/provider entries.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​angular-api/​igniteui-angular-fdc3/​22.0.0/​llms-full.txt Updates the declared snapshot version to 22.0.1.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​angular-api/​igniteui-angular-dashboards/​22.0.0/​llms-full.txt Refreshes dashboards to 22.0.1; removes module/provider entries.
packages/​igniteui-mcp/​igniteui-doc-mcp/​DEVELOPMENT.md Documents labels in the developer tool listing.

Review effort: Balanced

…s-framework doc components

An entry that ships in several packages was labelled with all of them, although
only one definition is served. The Package line now names the package the
entry was read from and lists the others on an 'Also in' line.

get_doc looks each listed component up in the framework its prefix names, so
Angular docs that use Igc web components get their package line.

Documents that the get_doc package line is local mode only.

Refs #1863

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Splitting on commas breaks multi-parameter generic component names, causing reference lookups to fail and valid package labels to disappear.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Preserve commas inside generic component names

packages/​igniteui-mcp/​igniteui-doc-mcp/​src/​tools/​doc-tools.ts:447

When a doc lists IgbCombo<TValue, TItem>, this split produces two incomplete names that the loader cannot resolve. The doc therefore loses its package label even though that component exists in the bundled Lite reference. Split only on commas outside generic argument lists, preserving exact names for lookup, and add a multi-parameter generic regression case.

3 resolved since last review

Review effort: Balanced

dkalinovInfra and others added 3 commits November 16, 2026 10:45
- Added functionality to drop pre-release suffixes in version strings within snapshotVersion.
- Updated tests to verify correct version parsing for pre-releases.
- Enhanced addPackageVersions to correctly handle component names with generic arguments, ensuring commas within generics are preserved.
- Introduced new package entries for IgniteUI Blazor components in tests.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The refresh includes prerelease API snapshots instead of the stated stable versions, while the loader strips prerelease suffixes and misleadingly labels those APIs as stable.

2 open issues

Review effort: Balanced

dkalinovInfra and others added 2 commits November 16, 2026 17:31
React packages to 19.11.0-rc.0; igniteui-webcomponents 7.5.0,
igniteui-dockmanager 2.3.0 and igniteui-grid-lite 0.12.0 to their
final releases.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
dkalinovInfra and others added 4 commits November 17, 2026 14:11
…se suffixes

Every docs/*-api/<package>/<version>/ folder is now the x.y.z version in the
snapshot's Version: header. The headers of snapshots built from pre-releases
name the release they lead to, which those packages publish after the CLI.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
22.0.2 exists only as an alpha, so the 11 igniteui-angular-* packages go back
to the snapshots built from the 22.0.1 release (as in 517cd25), in 22.0.1/
folders. igniteui-angular itself stays at 22.3.0.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The Version: header of every bundled llms-full.txt drops the patch number
(22.3.0 -> 22.3), so results read e.g. igniteui-angular@22.3. A snapshot
describes the whole minor line; folder names are unchanged. Examples in the
tool descriptions and docs follow.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@kdinev
kdinev merged commit 0a7d8ba into master Nov 17, 2026
4 checks passed
@kdinev
kdinev deleted the dkalinov/mcp-api-versions-1863 branch November 17, 2026 13:13
Copilot AI mentioned this pull request Nov 17, 2026
7 of 16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP: docs and API results do not say which package version they describe, and no version can be requested

4 participants