Skip to main content
Glama
nrwl

Nx MCP Server

Official
by nrwl
schema.ts3.06 kB
import type { ProjectsConfigurations } from 'nx/src/devkit-exports'; import type { Schema } from 'nx/src/utils/params'; export enum OptionType { Any = 'any', Array = 'array', Boolean = 'boolean', Number = 'number', String = 'string', } export type OptionPropertyDescription = Schema['properties'][number]; export type CliOption = { name: string; originalName?: string; positional?: number; alias?: string; hidden?: boolean; deprecated?: boolean | string; } & OptionPropertyDescription; export interface Option extends CliOption { tooltip?: string; itemTooltips?: ItemTooltips; items?: string[] | ItemsWithEnum; aliases: string[]; isRequired: boolean; 'x-dropdown'?: 'projects'; 'x-priority'?: 'important' | 'internal'; 'x-hint'?: string; } export interface ItemTooltips { [itemValue: string]: string; } export interface ItemsWithEnum { enum: string[]; type: OptionType; } export type XPrompt = string | LongFormXPrompt; export interface LongFormXPrompt { message: string; type: 'confirmation' | 'input' | 'list' | string; multiselect?: boolean; items?: (string | OptionItemLabelValue)[]; } export interface OptionItemLabelValue { label: string; value: string; } export interface TaskExecutionMessage { command: string; positional: string; flags: string[]; } export interface TaskExecutionSchema { name: string; command: string; collection?: string; positional: string; builder?: string; description: string; configurations?: TargetConfiguration[]; options: Option[]; contextValues?: { path?: string; directory?: string; project?: string; projectName?: string; }; } export type CollectionInfo = GeneratorCollectionInfo | ExecutorCollectionInfo; export interface GeneratorCollectionInfo { type: 'generator'; name: string; /** * The path to the file that lists all generators in the collection. */ configPath: string; schemaPath: string; data?: Generator; collectionName: string; } export interface ExecutorCollectionInfo { type: 'executor'; name: string; /** * The path to the file that lists all executors in the collection. */ configPath: string; schemaPath: string; implementationPath: string; collectionName: string; } export enum GeneratorType { Application = 'application', Library = 'library', Other = 'other', } export interface Generator { collection: string; name: string; description: string; options?: Option[]; type: GeneratorType; aliases: string[]; } export interface DefaultValue { name: string; defaultValue: string | undefined; } export interface TargetConfiguration { name: string; defaultValues: DefaultValue[]; } export interface Targets { name: string; project: string; builder: string | undefined; description: string; configurations: TargetConfiguration[]; options: CliOption[]; } export const WORKSPACE_GENERATOR_NAME_REGEX = /^workspace-(schematic|generator):(.+)/; export type WorkspaceProjects = ProjectsConfigurations['projects'];

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nrwl/nx-console'

If you have feedback or need assistance with the MCP directory API, please join our Discord server