Skip to content

fix(mcp): find inherited members in get_api_reference - #1906

Merged
kdinev merged 3 commits into
masterfrom
fix/mcp-api-reference-inherited-members
Nov 24, 2026
Merged

kdinev merged 3 commits into
masterfrom
fix/mcp-api-reference-inherited-members

Conversation

@dkalinovInfra

@dkalinovInfra dkalinovInfra commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Description

get_api_reference member lookups failed for anything a component inherits. In a recent skills test run every failed MCP call was one of these, e.g. IgxGridComponent.allowFiltering and IgxDatePickerComponent.inputFormat. The bundled API reference listed only the members a type declares itself and named no base type, so the tool had nowhere to look.

Changes:

  • API data: entries carry an Extends: line naming their documented base types. Members inherited from a base without its own entry (mixins, non-exported classes) are listed inline. docs/*-api is regenerated for all four platforms; no existing line was removed.
  • Member lookup: on a miss the handler walks the base types and reports where the member was found, e.g. IgxGridComponent.allowFiltering (properties, inherited from IgxGridBaseDirective). The not-found error names the base types that were searched.
  • Full entries: when a type inherits more, the response ends with a note naming the base types that hold the rest.
  • Input forms: Component.member is split like Component#member, and member() is accepted.
  • Tool description, schema text, README, DEVELOPMENT.md and Specification.md updated to match.

The data change comes from the generator in IgniteUI/api-docs: IgniteUI/api-docs#279. Until that merges and the blazor/api-docs submodule moves to it, regenerating docs/*-api from the pinned submodule would drop the Extends: lines. No submodule pointer is changed here.

Known gap: React components from the igniteui-react package (e.g. IgrCheckbox.disabled) still miss inherited members, because that package's TypeDoc JSON does not contain them. React grids are fixed.

Related Issue

None filed.

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

Additional Context

Run locally:

  • MCP package npm test (vitest): 497 pass.
  • spec/unit/mcp-runtime-spec: 43 specs, 0 failures.
  • Root npm run lint and npm run build: pass.
  • Root npm run test (lint, build, Jasmine with coverage): 983 of 985 specs executed, 0 failures, 2 pending (both pre-existing xits in the TypeScript AST transformer specs).

Checked against the built server: IgxGridComponent.allowFiltering, IgxDatePickerComponent.inputFormat, IgbGrid.Data and IgcGridComponent.data now resolve. IgxColumnComponent.required still returns not found, correctly: it is not a member of that class.

Proposed changelog line: * **fix(mcp):** get_api_reference finds inherited members and accepts Component.member.

🤖 Generated with Claude Code

Member lookups failed for anything a component inherits, because the
bundled API reference listed only the members a type declares itself.

- API entries carry an "Extends:" line naming their documented base
  types; members inherited from undocumented bases are listed inline.
- A member lookup walks the base types and says where the member was
  found. Full entries end with a note naming the base types.
- "Component.member" and "member()" are accepted as input.
- docs/*-api regenerated with the updated api-docs generator.

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

coveralls commented Nov 24, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 95.662%. remained the same — fix/mcp-api-reference-inherited-members 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

A critical package-resolution bug can resolve inherited members through the wrong package and incorrectly attribute them to the requesting component’s package.

1 open issue
What changed in this PR

This PR improves the MCP server’s get_api_reference tool so member lookups can follow documented inheritance chains rather than searching only the requested type.

Changes:

  • Adds base-type metadata and traversal, with inherited-member attribution and clearer lookup guidance.
  • Accepts dotted component/member names and call-style member input.
  • Refreshes bundled API snapshots and updates tests, schemas, and documentation.
File Description
spec/​unit/​mcp-runtime-spec.ts Adds base-lookup support to runtime test doubles.
packages/​igniteui-mcp/​Specification.md Documents inherited-member lookup and optional member selection.
packages/​igniteui-mcp/​igniteui-doc-mcp/​src/​tools/​schemas.ts Clarifies inherited-member support in the schema.
packages/​igniteui-mcp/​igniteui-doc-mcp/​src/​tools/​handlers.ts Normalizes input and searches documented base types.
packages/​igniteui-mcp/​igniteui-doc-mcp/​src/​tools/​constants.ts Updates tool descriptions and lookup guidance.
packages/​igniteui-mcp/​igniteui-doc-mcp/​src/​lib/​types/​docs.types.ts Adds inheritance metadata to API entries.
packages/​igniteui-mcp/​igniteui-doc-mcp/​src/​lib/​api-doc-loader.ts Parses base names and traverses inheritance chains.
packages/​igniteui-mcp/​igniteui-doc-mcp/​src/​__tests__/​tools/​handlers.test.ts Covers inherited lookups and input normalization.
packages/​igniteui-mcp/​igniteui-doc-mcp/​src/​__tests__/​lib/​api-doc-loader.test.ts Tests inheritance parsing, traversal, and cycle handling.
packages/​igniteui-mcp/​igniteui-doc-mcp/​README.md Updates the API tool listing.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​webcomponents-api/​igniteui-webcomponents-spreadsheet/​7.1.1/​llms-full.txt Adds spreadsheet base links and inherited members.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​webcomponents-api/​igniteui-webcomponents-maps/​7.1.1/​llms-full.txt Adds map-type inheritance links.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​webcomponents-api/​igniteui-webcomponents-layouts/​7.1.1/​llms-full.txt Adds tool-action inheritance links.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​webcomponents-api/​igniteui-webcomponents-inputs/​7.1.1/​llms-full.txt Links input-group subclasses to their base.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​webcomponents-api/​igniteui-webcomponents-gauges/​7.1.1/​llms-full.txt Adds gauge event-argument base links.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​webcomponents-api/​igniteui-webcomponents-dashboards/​7.1.1/​llms-full.txt Links dashboard grouping to its base type.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​webcomponents-api/​igniteui-webcomponents-core/​7.1.1/​llms-full.txt Adds core inheritance links and inherited methods.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​webcomponents-api/​igniteui-dockmanager/​2.3.0/​llms-full.txt Adds inherited event methods and a resize-event base link.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​react-api/​igniteui-react/​19.11.0/​llms-full.txt Adds context inheritance and inherited resource strings.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​react-api/​igniteui-react-spreadsheet/​19.6.0/​llms-full.txt Adds spreadsheet base links and inherited members.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​react-api/​igniteui-react-maps/​19.6.0/​llms-full.txt Adds map class and props-interface inheritance.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​react-api/​igniteui-react-layouts/​19.6.0/​llms-full.txt Adds tool-action class and props inheritance.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​react-api/​igniteui-react-inputs/​19.6.0/​llms-full.txt Adds input class and props inheritance.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​react-api/​igniteui-react-gauges/​19.6.0/​llms-full.txt Adds gauge event-argument base links.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​react-api/​igniteui-react-dockmanager/​19.11.0/​llms-full.txt Adds inherited resize-event properties.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​react-api/​igniteui-react-dashboards/​19.6.0/​llms-full.txt Links dashboard grouping to its base type.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​react-api/​igniteui-react-core/​19.6.0/​llms-full.txt Adds core class and interface inheritance links.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​blazor-api/​IgniteUI.Blazor.Lite/​1.0.1/​llms-full.txt Adds component base chains and inline inherited members.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​angular-api/​igniteui-angular-spreadsheet/​22.0.1/​llms-full.txt Adds spreadsheet base links and inherited members.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​angular-api/​igniteui-angular-maps/​22.0.1/​llms-full.txt Adds map-type inheritance links.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​angular-api/​igniteui-angular-layouts/​22.0.1/​llms-full.txt Adds tool-action inheritance links.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​angular-api/​igniteui-angular-inputs/​22.0.1/​llms-full.txt Links input-group subclasses to their base.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​angular-api/​igniteui-angular-gauges/​22.0.1/​llms-full.txt Adds gauge event-argument base links.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​angular-api/​igniteui-angular-dashboards/​22.0.1/​llms-full.txt Links dashboard grouping to its base type.
packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​angular-api/​igniteui-angular-core/​22.0.1/​llms-full.txt Adds core inheritance links and a URI enum value.
packages/​igniteui-mcp/​igniteui-doc-mcp/​DEVELOPMENT.md Explains input shorthand, inheritance traversal, and snapshot format.

Review effort: Balanced

Base lookup used the platform-wide index, where the last package loaded
wins a shared name. IgniteUI.Blazor entries such as IgbSelect were walked
through IgniteUI.Blazor.Lite's copy of their base, which has different
members, and the result was reported under the requesting package.

A base is now taken from the entry's own package when that package has
it, with the platform-wide lookup as the fallback.

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

Several generated inherited-member entries retain unresolved generic type arguments, including IgbInput.ValueChanging documenting EventCallback<TValue> instead of EventCallback<string>, and need correction.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Low severity Resolve inherited generic member types when generating entries

packages/​igniteui-mcp/​igniteui-doc-mcp/​docs/​blazor-api/​IgniteUI.Blazor.Lite/​1.0.1/​llms-full.txt:1582

The newly inlined IgbInput.ValueChanging uses EventCallback<TValue>, although IgbInput is non-generic and its value is a string, so member lookups return an unresolved payload type. Substitute concrete base type arguments when generating inherited members and regenerate the affected entries (EventCallback<string> here and for IgbMaskInput). The same issue occurs in this file at IgbMaskInput.ValueChanging:1730, IgbDropdownItem.Value:1402, and IgbNumberEventArgs.Detail:1842.

1 resolved since last review

Review effort: Balanced

@kdinev
kdinev merged commit 594f59f into master Nov 24, 2026
4 checks passed
@kdinev
kdinev deleted the fix/mcp-api-reference-inherited-members branch November 24, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants