Core Methods API Reference
Complete reference for FlowMCP Core methods based on the official FlowMCP Core documentation.Import Statement
Method Overview
| Method | Purpose | Returns |
|---|---|---|
.getArgvParameters() | Parse command line arguments | { source, includeNamespaces, excludeNamespaces, activateTags } |
.filterArrayOfSchemas() | Filter schema collections | { filteredArrayOfSchemas } |
.activateServerTools() | Bulk activate MCP tools | { mcpTools } |
.activateServerTool() | Activate single MCP tool | { toolName, mcpTool } |
.prepareServerTool() | Prepare tool configuration | { toolName, description, zod, func } |
.getZodInterfaces() | Generate Zod validation | { routeName: ZodSchema } |
.getAllTests() | Extract test cases | [{ routeName, userParams }] |
.validateSchema() | Validate schema structure | { status, messages } |
.fetch() | Execute API requests | { status, dataAsString, messages } |
Core Methods
.getArgvParameters()
Parses command line arguments into structured configuration for schema filtering and processing.| Key | Type | Default | Description | Required |
|---|---|---|---|---|
argv | array | Process arguments array (typically process.argv) | Yes | |
includeNamespaces | array | [] | Default namespaces to include | No |
excludeNamespaces | array | [] | Default namespaces to exclude | No |
activateTags | array | [] | Default tags to activate | No |
.filterArrayOfSchemas()
Advanced filtering system for schema arrays with namespace, tag, and route-level filtering capabilities. Supports case-insensitive matching and comprehensive error collection.| Key | Type | Description | Required |
|---|---|---|---|
arrayOfSchemas | array | Array of schema objects to filter | Yes |
includeNamespaces | array | Namespaces to include (takes precedence over exclude) | Yes |
excludeNamespaces | array | Namespaces to exclude (ignored if include is specified) | Yes |
activateTags | array | Mixed array of tags and route filters (tag or namespace.route) | Yes |
activateTags are invalid (non-existent tags, routes, or namespaces), the method throws an error with detailed information about all invalid entries.
Example:
.activateServerTools()
Bulk activation of MCP server tools from a schema definition. Automatically generates and registers all routes as server tools.| Key | Type | Default | Description | Required |
|---|---|---|---|---|
server | object | MCP Server instance to register tools with | Yes | |
schema | object | Schema definition containing routes | Yes | |
serverParams | object | Server-specific parameters for API authentication | Yes | |
validate | boolean | true | Enable input validation before activation | No |
silent | boolean | true | Suppress console output during activation | No |
.activateServerTool()
Activates a single MCP server tool from a specific schema route.| Key | Type | Default | Description | Required |
|---|---|---|---|---|
server | object | MCP Server instance to register tool with | Yes | |
schema | object | Schema definition containing the route | Yes | |
routeName | string | Name of the specific route to activate | Yes | |
serverParams | object | Server-specific parameters for API authentication | Yes | |
validate | boolean | true | Enable input validation before activation | No |
.prepareServerTool()
Prepares server tool configuration without activating it. Useful for testing, inspection, or custom tool registration workflows.| Key | Type | Default | Description | Required |
|---|---|---|---|---|
schema | object | Schema definition containing the route | Yes | |
serverParams | object | Server-specific parameters for API authentication | Yes | |
routeName | string | Name of the specific route to prepare | Yes | |
validate | boolean | true | Enable input validation before preparation | No |
.getZodInterfaces()
Generates TypeScript-compatible Zod validation schemas from FlowMCP schema definitions.| Key | Type | Description | Required |
|---|---|---|---|
schema | object | Schema definition to generate types for | Yes |
.getAllTests()
Extracts comprehensive test cases from schema definitions.| Key | Type | Description | Required |
|---|---|---|---|
schema | object | Schema definition to generate tests from | Yes |
.validateSchema()
Validates a schema against the FlowMCP specification.| Key | Type | Description | Required |
|---|---|---|---|
schema | object | FlowMCP schema to validate | Yes |
.fetch()
Executes HTTP requests using schema definitions with automatic parameter substitution.| Key | Type | Description | Required |
|---|---|---|---|
schema | object | FlowMCP schema containing the route | Yes |
userParams | object | User-provided parameters for substitution | Yes |
serverParams | object | Server-side parameters (API keys, etc.) | Yes |
routeName | string | Name of the route to execute | Yes |
Error Handling
All methods provide structured error responses:Resources
- FlowMCP Core Repository - Source code and implementation
- Schema Specification - v1.2.2 schema format guide
- Filtering Documentation - Complete filtering specification