open-index/open-npm huggingface dataset:
npm package: @phoenix-erp/mcp-shared
Description: Shared types, schemas and constants for Phoenix ERP MCP server and client
Latest version: 0.3.0

# @phoenix-erp/mcp-shared

Shared types, Zod schemas, and constants for the Phoenix ERP MCP server and client.

## Install

```bash
npm install @phoenix-erp/mcp-shared
```

## Types

```typescript
import { Category, type Document, type Section, type SearchResult } from '@phoenix-erp/mcp-shared';
```

| Export | Kind | Description |
|--------|------|-------------|
| `Category` | enum | `'dev-guide'` / `'user-guide'` |
| `Document` | type | Full document with slug, title, category, sections, rawContent |
| `Section` | type | Parsed section with id, title, content, codeBlocks, children, path |
| `CodeBlock` | type | Extracted code block with language, content, context |
| `SearchResult` | type | Search hit with section, score, category, documentTitle |
| `IndexedSection` | type | Flat section for MiniSearch indexing |
| `EmbeddedData` | type | Build-time embedded documents payload |

## Zod Schemas

Input validation schemas for all 8 MCP tools. Each schema has a corresponding inferred TypeScript type.

```typescript
import { SearchDocsInputSchema, type SearchDocsInput } from '@phoenix-erp/mcp-shared';
```

| Schema | Inferred Type | Tool |
|--------|---------------|------|
| `CategorySchema` | -- | Shared category validation |
| `SearchDocsInputSchema` | `SearchDocsInput` | `search_docs` |
| `GetSectionInputSchema` | `GetSectionInput` | `get_section` |
| `ListDocumentsInputSchema` | `ListDocumentsInput` | `list_documents` |
| `ListSectionsInputSchema` | `ListSectionsInput` | `list_sections` |
| `GetCodeExamplesInputSchema` | `GetCodeExamplesInput` | `get_code_examples` |
| `GetArchitectureInputSchema` | `GetArchitectureInput` | `get_architecture` |
| `GetFileMapInputSchema` | `GetFileMapInput` | `get_file_map` |
| `GetUsageStatsInputSchema` | `GetUsageStatsInput` | `get_usage_stats` |

## Constants

```typescript
import { TOOL_NAMES, PROMPT_NAMES, RESOURCE_URIS, SERVER_INFO } from '@phoenix-erp/mcp-shared';
```

| Constant | Description |
|----------|-------------|
| `TOOL_NAMES` | Tool name strings: `SEARCH_DOCS`, `GET_SECTION`, `LIST_DOCUMENTS`, `LIST_SECTIONS`, `GET_CODE_EXAMPLES`, `GET_ARCHITECTURE`, `GET_FILE_MAP`, `GET_USAGE_STATS` |
| `PROMPT_NAMES` | Prompt name strings: `ONBOARD_DEVELOPER`, `IMPLEMENT_FEATURE`, `REVIEW_CODE`, `EXPLAIN_FEATURE`, `SUPPORT_ANSWER`, `ANALYZE_COSTS` |
| `RESOURCE_URIS` | Resource URI templates: `ALL_DOCS`, `DEV_GUIDE`, `USER_GUIDE` |
| `SERVER_INFO` | Server metadata: `name`, `version` |

## License

MIT