Generated from trpc-methods.json. Run pnpm trpc:build then pnpm docs:methods to refresh. Do not edit this page manually – use the generator instead.

Namespace ai

ai.generateText

MUTATIONai.generateText
Generate structured text completions across supported AI providers.

Executes guarded text generation with system prompt protection, token metering, and BYOK handling for authenticated and public callers.

📥Input Parameters
  • content string
  • systemPrompt string
  • provider enumoptional
    Allowed values
    anthropicopenaigoogleopenrouter
  • apiKey stringoptional
  • metadata objectoptional
    • name stringoptional
    • type stringoptional
  • options objectoptional
    • model stringoptional
    • maxTokens numberoptionaldefault
    • temperature numberoptional
📤Response
  • success boolean
  • data any
  • tokenUsage objectoptional
    • tokensUsed number
    • tokensCharged number
    • platformFee numbernullable
    • remainingBalance numbernullable
  • usageInfo objectoptional
    • tokensUsed number
    • estimatedCostUsd number
Examples
const { data } = await client.ai.generateText.mutate({
content: 'Compose a friendly onboarding email for new engineers.',
systemPrompt: 'You are a helpful onboarding assistant.',
});
console.log(data.success, data.data?.usage?.totalTokens);

ai.getRegistryHealth

QUERYai.getRegistryHealth
Retrieve the AI model registry health status.

Reports availability and summary metrics for the registry integration, falling back to error details when checks fail.

📥Input Parameters
No structured fields (void)
📤Response
Not documented.

ai.listAllowedModels

QUERYai.listAllowedModels
List allowed models for a provider (respects model restrictions)

List allowed models for a provider (respects model restrictions) Returns production-ready model IDs that can be used directly with AI SDKs

📥Input Parameters
  • provider enumoptional
    Allowed values
    anthropicopenaigoogleopenrouter
📤Response
Not documented.

ai.listProviders

List available AI service providers.

Returns the providers currently registered in the model registry along with metadata about the registry source.

📥Input Parameters
No structured fields (void)
📤Response
Not documented.

ai.listProvidersBYOK

QUERYai.listProvidersBYOK
List available BYOK (Bring Your Own Key) providers.

Filters the provider catalog to only those eligible for user-supplied API keys.

📥Input Parameters
No structured fields (void)
📤Response
Not documented.

ai.validateProvider

MUTATIONai.validateProvider
Validate AI provider configuration.

Performs lightweight API key validation for supported providers to catch obvious misconfigurations.

📥Input Parameters
  • provider enum
    Allowed values
    anthropicopenaigoogle
  • apiKey string
📤Response
Not documented.

Namespace mcp

mcp.apiDocumentationPrompt

QUERYmcp.apiDocumentationPrompt

Generate comprehensive API documentation from code

📥Input Parameters
  • code string
    API code to document
  • format enumdefault
    Output format
    Allowed values
    markdownopenapijson
📤Response
Not documented.

mcp.codeReviewPrompt

QUERYmcp.codeReviewPrompt

Comprehensive code review with security, performance, and maintainability analysis

📥Input Parameters
  • code string
    Code to review
  • language string
    Programming language
  • focusArea stringoptional
    Focus area
📤Response
Not documented.

mcp.currentSystemTime

QUERYmcp.currentSystemTime

Get the current system time

📥Input Parameters
  • format enumdefault
    Time format
    Allowed values
    isotimestamplocale
📤Response
Not documented.

mcp.echo

Echo back a message

📥Input Parameters
  • message string
    Message to echo back
📤Response
Not documented.

mcp.explainConceptPrompt

QUERYmcp.explainConceptPrompt

Explain technical concepts clearly at different skill levels

📥Input Parameters
  • concept string
    Concept to explain
  • level enum
    Skill level
    Allowed values
    beginnerintermediateadvanced
  • includeExamples enumdefault
    Include examples
    Allowed values
    yesno
📤Response
Not documented.

mcp.getResources

List MCP resources

List available MCP resources with metadata

📥Input Parameters
  • category stringoptional
    Filter resources by category
  • search stringoptional
    Search resources by name or description
📤Response
  • resources arrayarray
  • total number

mcp.greeting

Generate a friendly greeting in the specified language

📥Input Parameters
  • name string
    Name to greet
  • language enumdefault
    Language for the greeting
    Allowed values
    enesfrde
📤Response
Not documented.

mcp.incidentResponsePrompt

QUERYmcp.incidentResponsePrompt

Guide incident response procedures and provide action steps

📥Input Parameters
  • description string
    Incident description
  • severity enum
    Severity level
    Allowed values
    criticalhighmediumlow
  • status stringoptional
    Current status
📤Response
Not documented.

mcp.readResource

Read resource content

Read the content of a specific MCP resource

📥Input Parameters
  • uri string
    URI of the resource to read
📤Response
  • content any
  • mimeType string
  • uri string

Namespace admin

admin.clearCache

MUTATIONadmin.clearCache
Clear caches and reset services

Clear caches and reset services

Clear system caches and reset services

📥Input Parameters
  • target enumdefault
    Allowed values
    allmemorytokensusage
📤Response
Not documented.

admin.getConfig

QUERYadmin.getConfig
System configuration management

System configuration management

Get current system configuration

📥Input Parameters
  • section enumdefault
    Allowed values
    allserverauthaibilling
📤Response
Not documented.

admin.getUserInfo

QUERYadmin.getUserInfo
Get user information (admin only)

Get user information (admin only)

Get detailed user information and permissions

📥Input Parameters
  • userId string
    User ID to lookup
  • includePermissions booleandefault
    Include detailed permissions
  • includeUsage booleandefault
    Include usage statistics
📤Response
Not documented.

admin.healthCheck

QUERYadmin.healthCheck
System health checks

System health checks

Run comprehensive health checks on all services

📥Input Parameters
Not documented.
📤Response
Not documented.

admin.statistics

QUERYadmin.statistics
Get system statistics

Get system statistics

Get detailed system statistics and metrics

📥Input Parameters
  • days numberdefault
    Number of days for statistics
📤Response
Not documented.

admin.status

QUERYadmin.status
Server status with detailed information

Server status with detailed information

Get detailed server status and health information

📥Input Parameters
  • detailed booleandefault
    Include detailed system information
📤Response
  • status string
  • uptime number
  • memory object
    • used number
    • total number
    • percentage number
  • system objectoptional
    • platform string
    • arch string
    • nodeVersion string
  • timestamp string

Namespace auth

auth.deleteUserKey

MUTATIONauth.deleteUserKey
Delete user API key

Delete user API key

📥Input Parameters
  • email string
  • provider enum
    Allowed values
    anthropicopenaigoogle
📤Response
Not documented.

auth.getUserKey

QUERYauth.getUserKey
Get user API key status (without exposing the key)

Get user API key status (without exposing the key)

📥Input Parameters
  • email string
  • provider enum
    Allowed values
    anthropicopenaigoogle
📤Response
Not documented.

auth.getUserProviders

QUERYauth.getUserProviders
Get all configured providers for a user

Get all configured providers for a user

📥Input Parameters
  • email string
📤Response
Not documented.

auth.rotateUserKey

MUTATIONauth.rotateUserKey
Rotate (update) user API key

Rotate (update) user API key

📥Input Parameters
  • email string
  • provider enum
    Allowed values
    anthropicopenaigoogle
  • newApiKey string
📤Response
Not documented.

auth.storeUserKey

MUTATIONauth.storeUserKey
Store user API key (BYOK)

Store user API key (BYOK)

📥Input Parameters
  • email string
  • provider enum
    Allowed values
    anthropicopenaigoogle
  • apiKey string
📤Response
Not documented.

auth.validateUserKey

MUTATIONauth.validateUserKey
Validate user API key

Validate user API key

📥Input Parameters
  • email string
  • provider enum
    Allowed values
    anthropicopenaigoogle
📤Response
Not documented.

Namespace billing

billing.getConsumptionHistory

QUERYbilling.getConsumptionHistory
Get consumption history for user

Get consumption history for user

📥Input Parameters
  • limit numberdefault
📤Response
Not documented.

billing.getPurchaseHistory

QUERYbilling.getPurchaseHistory
Get user's purchase history (both subscription and one-time)

Get user's purchase history (both subscription and one-time)

📥Input Parameters
  • limit numberdefault
  • type enumdefault
    Allowed values
    allsubscriptionone_time
📤Response
Not documented.

billing.getTokenBalance

QUERYbilling.getTokenBalance
Get user's token balance (requires authentication)

Get user's token balance (requires authentication)

📥Input Parameters
No structured fields (void)
📤Response
Not documented.

billing.getTopupHistory

QUERYbilling.getTopupHistory
Get user's token purchase history (requires authentication)

Get user's token purchase history (requires authentication)

📥Input Parameters
  • limit numberdefault
📤Response
Not documented.

billing.getUsageAnalytics

QUERYbilling.getUsageAnalytics
Get user's complete usage analytics (for both subscription and BYOK users)

Get user's complete usage analytics (for both subscription and BYOK users)

📥Input Parameters
  • days numberdefault
  • includeHistory booleandefault
  • historyLimit numberdefault
📤Response
Not documented.

billing.getUsageHistory

QUERYbilling.getUsageHistory
Get user's token usage history (requires authentication)

Get user's token usage history (requires authentication)

📥Input Parameters
  • limit numberdefault
📤Response
Not documented.

billing.getUserTokenBalances

QUERYbilling.getUserTokenBalances
Get user's token balances (all types)

Get user's token balances (all types)

📥Input Parameters
No structured fields (void)
📤Response
Not documented.

billing.planConsumption

QUERYbilling.planConsumption
Plan token consumption for a request (preview before execution)

Plan token consumption for a request (preview before execution)

📥Input Parameters
  • estimatedTokens number
  • hasApiKey booleandefault
📤Response
Not documented.

Namespace system

system.addServerWorkspace

MUTATIONsystem.addServerWorkspace
Add a new server workspace configuration

Add a new server workspace configuration

Add a new server workspace configuration for file operations

📥Input Parameters
  • id string
    Unique identifier for the workspace folder
  • config object
    • path string
      Absolute path to the workspace folder
    • name stringoptional
      Display name for the workspace folder
    • description stringoptional
      Description of the workspace folder purpose
    • readOnly booleandefault
      Whether this server workspace is read-only
    • allowedPaths arrayoptionalarray
      Allowed path patterns (glob)
    • blockedPaths arrayoptionalarray
      Blocked path patterns (glob)
    • maxFileSize numberoptional
      Maximum file size in bytes
    • allowedExtensions arrayoptionalarray
      Allowed file extensions
    • blockedExtensions arrayoptionalarray
      Blocked file extensions
    • followSymlinks booleandefault
      Whether to follow symbolic links
    • enableWatching booleandefault
      Whether to watch for file changes
📤Response
  • success boolean
  • id string
  • message string

system.getServerWorkspaces

QUERYsystem.getServerWorkspaces
Get configured server workspaces for client applications

Get configured server workspaces for client applications

Get all configured server workspaces with accessibility status

📥Input Parameters
No structured fields (void)
📤Response
No structured fields (record)

system.health

QUERYsystem.health
Health check procedure

Health check procedure

📥Input Parameters
No structured fields (void)
📤Response
Not documented.

system.listClientWorkspaces

QUERYsystem.listClientWorkspaces
List registered client workspaces (MCP client roots)

List registered client workspaces (MCP client roots) This is separate from server workspaces and MCP roots/list

List all registered client workspace folders

📥Input Parameters
No structured fields (void)
📤Response
No structured fields (array)

system.listFiles

QUERYsystem.listFiles

List files and directories in a configured root folder

📥Input Parameters
  • workspaceId enum
    Server workspace ID
    Allowed values
    default
  • path stringdefault
    Relative path within workspace folder
  • recursive booleandefault
    Include subdirectories recursively
  • includeDirectories booleandefault
    Include directories in results
📤Response
No structured fields (array)

system.pathExists

QUERYsystem.pathExists

Check if a file or directory exists in a configured root folder

📥Input Parameters
  • workspaceId enum
    Server workspace ID
    Allowed values
    default
  • path string
    Relative path within workspace folder
📤Response
  • exists boolean
  • path string

system.readFile

QUERYsystem.readFile

Read the content of a file from a configured root folder

📥Input Parameters
  • workspaceId enum
    Server workspace ID
    Allowed values
    default
  • path string
    Relative file path within workspace folder
  • encoding enumdefault
    File encoding
    Allowed values
    utf8base64binary
📤Response
  • content string
  • size number
  • encoding string
  • mimeType stringoptional

system.registerClientWorkspace

MUTATIONsystem.registerClientWorkspace
Register a client workspace (MCP client root)

Register a client workspace (MCP client root) This allows MCP clients to dynamically register their workspace folders

Register a client workspace folder for MCP access

📥Input Parameters
  • id string
    Unique identifier for the client workspace
  • uri string
    File URI of the client workspace (e.g., file:///path/to/folder)
  • name stringoptional
    Display name for the workspace
  • description stringoptional
    Description of the workspace
📤Response
  • success boolean
  • id string
  • message string

system.removeServerWorkspace

MUTATIONsystem.removeServerWorkspace
Remove a server workspace configuration

Remove a server workspace configuration

📥Input Parameters
  • id string
    Server workspace ID to remove
📤Response
  • success boolean
  • id string
  • message string

system.test

MUTATIONsystem.test
Simple test procedure with minimal Zod schema

Simple test procedure with minimal Zod schema

Just a echo test endpoint

📥Input Parameters
  • message stringoptionaldefault
📤Response
  • message string

system.unregisterClientWorkspace

MUTATIONsystem.unregisterClientWorkspace
Unregister a client workspace (MCP client root)

Unregister a client workspace (MCP client root)

Unregister a client workspace folder

📥Input Parameters
  • id string
    Client workspace ID to unregister
📤Response
  • success boolean
  • id string
  • message string

system.writeFile

MUTATIONsystem.writeFile

Write content to a file in a configured root folder

📥Input Parameters
  • workspaceId enum
    Server workspace ID
    Allowed values
    default
  • path string
    Relative file path within workspace folder
  • content string
    File content to write
  • encoding enumdefault
    Content encoding
    Allowed values
    utf8base64binary
📤Response
  • success boolean
  • path string
  • size number

Namespace user

user.checkRequestEligibility

QUERYuser.checkRequestEligibility
Check if user can make AI requests (subscription users need tokens, BYOK users need API key)

Check if user can make AI requests (subscription users need tokens, BYOK users need API key)

📥Input Parameters
  • estimatedTokens numberdefault
  • hasApiKey booleandefault
📤Response
Not documented.

user.configureBYOK

MUTATIONuser.configureBYOK
Configure BYOK providers for user (SECURE - API keys stored server-side)

Configure BYOK providers for user (SECURE - API keys stored server-side)

📥Input Parameters
  • providers recordrecord
  • enabled booleandefault
📤Response
Not documented.

user.getBYOKStatus

QUERYuser.getBYOKStatus
Get BYOK configuration status (without exposing API keys)

Get BYOK configuration status (without exposing API keys)

📥Input Parameters
No structured fields (void)
📤Response
Not documented.

user.getUserProfile

QUERYuser.getUserProfile
Get user profile with capabilities and preferences (hybrid users)

Get user profile with capabilities and preferences (hybrid users)

📥Input Parameters
No structured fields (void)
📤Response
Not documented.

user.getUserStatus

QUERYuser.getUserStatus
Get user status (subscription vs BYOK, purchase history)

Get user status (subscription vs BYOK, purchase history)

📥Input Parameters
No structured fields (void)
📤Response
Not documented.

user.updateUserPreferences

MUTATIONuser.updateUserPreferences
Update user consumption preferences

Update user consumption preferences

📥Input Parameters
  • consumptionOrder arrayoptionalarray
  • byokEnabled booleanoptional
  • byokProviders recordoptionalrecord
  • notifyTokenLowThreshold numberoptional
  • notifyFallbackToByok booleanoptional
  • notifyOneTimeConsumed booleanoptional
📤Response
Not documented.