Conversation
- P1: create metadata-report script and tool-metadata-audit utility; add pnpm dlx tsx invocation to package.json so pnpm metadata-report works - P2: resolve data dir relative to script file (cwd-independent); exit 1 on error instead of silently swallowing it - P2: gate page-size and sort dropdowns behind enableFilters; export filterTools with operations/behavior-flag filtering via options object; extract helpers to stay within complexity and param-count lint rules; add 13 tests covering the new filter paths - P2: export getSharedServiceDomain from toolkit-page (was internal); add 5 tests covering shared/mixed/empty/multi-domain edge cases - P3: fix telemetry page title typo (Telemtry -> Telemetry) Made-with: Cursor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| )} | ||
| </SelectContent> | ||
| </Select> | ||
| </> |
There was a problem hiding this comment.
Page size and sort hidden when filters disabled
Medium Severity
The page size and sort dropdowns were moved inside the enableFilters block. When enableFilters is false, users no longer see these controls, even if the toolbar is visible (e.g. when enableSearch is true). Previously, page size and sort were always shown whenever the toolbar was shown.
The prior commit added TOOL_METADATA_SERVICE_DOMAIN_STYLES, TOOL_METADATA_OPERATION_STYLES, and TOOL_METADATA_FALLBACK_STYLE imports to toolkit-page.tsx but the corresponding exports were never committed to constants.ts, breaking the Vercel build. Made-with: Cursor
- Add BehaviorFlagKey type export to types/index.ts (fixes Vercel build error: 'BehaviorFlagKey' not exported from types) - getSharedServiceDomain: add typeof string guard before accepting a serviceDomains entry; prevents TypeError if JSON has a non-string value calling .replace() on a Badge label (high severity) - matchesBehaviorFlags: skip entries where expected is undefined; with Partial<Record<BehaviorFlagKey, boolean>> a key can be undefined to mean "don't filter", but the old code compared !== expected which incorrectly excluded tools (low severity) Made-with: Cursor
| </div> | ||
| )} | ||
| {enableFilters && ( | ||
| <Select |
There was a problem hiding this comment.
FilterToolsOptions never passed to filterTools
Low Severity
filterTools was extended with FilterToolsOptions (activeOperations, behaviorFlags), but AvailableToolsTable never passes these options. The new filtering logic is dead code in production.
Additional Locations (1)
|
|
||
| const behaviorRows = buildBehaviorRows(metadata.behavior); | ||
| const hasOperations = metadata.behavior.operations.length > 0; | ||
| const hasServiceDomains = metadata.classification.serviceDomains.length > 0; |
There was a problem hiding this comment.
ToolMetadataSection crashes on partial metadata
Low Severity
ToolMetadataSection accesses metadata.behavior and metadata.classification without optional chaining. If metadata exists but is partial (e.g. missing behavior or classification, or behavior.operations / classification.serviceDomains undefined), the component will throw at runtime.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| } from "../constants"; | ||
| import type { ToolMetadata, ToolMetadataBehavior } from "../types"; | ||
|
|
||
| type BehaviorFlagKey = "readOnly" | "destructive" | "idempotent" | "openWorld"; |
There was a problem hiding this comment.
Redundant BehaviorFlagKey type definition
Low Severity
BehaviorFlagKey is defined locally in tool-metadata-section.tsx but the same type is exported from types/index.ts. available-tools-table imports it from types. Duplicating the type risks drift if one definition is updated without the other.
Additional Locations (1)
| key={operation} | ||
| styles={TOOL_METADATA_OPERATION_STYLES} | ||
| value={operation} | ||
| /> |
There was a problem hiding this comment.
EnumBadge crashes on non-string enum values
Low Severity
EnumBadge receives operation and domain from metadata.behavior.operations and metadata.classification.serviceDomains and passes them to formatEnumLabel(value), which calls value.split("_"). If the JSON or API returns non-string values (e.g. numbers or null), a TypeError is thrown because non-strings have no split method.


Note
Medium Risk
Adds new metadata-driven UI (per-tool “Execution hints” and toolkit-level service-domain badge) plus new filtering logic and a reporting CLI; primary risk is incorrect/partial metadata rendering or filtering when metadata is missing/null.
Overview
Surfaces Engine-provided tool metadata in toolkit docs by adding a new
ToolMetadataSection(“Execution hints”) that displays operations, service domains, behavior flags (readOnly/destructive/idempotent/openWorld), and optional extra JSON, and wiringtool.metadatathroughToolkitPageandToolSection.Adds a toolkit-level “Service domain” badge when all tools share exactly one domain (
getSharedServiceDomain), introduces style maps for operation/domain badges inconstants.ts, and extendsfilterToolsto support metadata-based filtering (operations + behavior flags) with new Vitest coverage.Includes a new
pnpm metadata-reportCLI (toolkit-docs-generator/scripts/report-tool-metadata.ts) to audit metadata coverage/distinct enum values, and minor UI polish for the expandableDynamicCodeBlockheader/controls.Written by Cursor Bugbot for commit b03bd5e. This will update automatically on new commits. Configure here.