Skip to main content

Overview

Elicitation errors are thrown during the MCP elicitation flow — the mechanism that allows tools to request additional user input during execution. These errors cover unsupported clients, timeouts, fallback flows, store initialization, encryption failures, and subscription issues.

Error Reference

ElicitationNotSupportedError

Thrown when attempting to elicit from a client that does not support elicitation or when the transport is unavailable.
PropertyTypeValue
codestringELICITATION_NOT_SUPPORTED
statusCodenumber400
isPublicbooleantrue
new ElicitationNotSupportedError(message?: string)
Example:
import { ElicitationNotSupportedError } from '@frontmcp/sdk';

throw new ElicitationNotSupportedError('Client does not support elicitation');

ElicitationTimeoutError

Thrown when an elicitation request times out waiting for the user’s response.
PropertyTypeValue
codestringELICITATION_TIMEOUT
statusCodenumber408
isPublicbooleantrue
elicitIdstringThe timed-out request ID
ttlnumberThe TTL that was exceeded (ms)
new ElicitationTimeoutError(elicitId: string, ttl: number)
Example:
import { ElicitationTimeoutError } from '@frontmcp/sdk';

throw new ElicitationTimeoutError('elicit_abc', 60000);
// Public: "Elicitation request timed out. The user did not respond within the allowed time (60 seconds)."

ElicitationFallbackRequired

Thrown when elicitation is requested but the client doesn’t support the standard protocol. This is not a failure — it triggers the fallback flow where the tool returns instructions to the LLM, and the LLM uses sendElicitationResult to continue.
PropertyTypeValue
codestringELICITATION_FALLBACK
statusCodenumber200
isPublicbooleantrue
elicitIdstringUnique elicitation request ID
elicitMessagestringMessage to display to user
schemaRecord<string, unknown>JSON Schema for expected response
toolNamestringTool that requested elicitation
toolInputunknownOriginal tool input args
ttlnumberTime-to-live (ms)
new ElicitationFallbackRequired(
  elicitId: string,
  elicitMessage: string,
  schema: Record<string, unknown>,
  toolName: string,
  toolInput: unknown,
  ttl: number,
)
This error has a statusCode of 200 because it is not a failure — it’s a signal to switch to the fallback elicitation flow.

ElicitationStoreNotInitializedError

Thrown when attempting to access the elicitation store before scope initialization has completed. Callers should await scope.ready before accessing elicitationStore.
PropertyTypeValue
codestringELICITATION_STORE_NOT_INITIALIZED
statusCodenumber500
isPublicbooleanfalse
new ElicitationStoreNotInitializedError()

ElicitationDisabledError

Thrown when elicitation is used but disabled in server configuration. Enable via @FrontMcp({ elicitation: { enabled: true } }).
PropertyTypeValue
codestringELICITATION_DISABLED
statusCodenumber400
isPublicbooleantrue
new ElicitationDisabledError()
The internal message includes configuration guidance. The public message is: "Elicitation is disabled on this server."

ElicitationEncryptionError

Thrown when encryption or decryption of elicitation data fails — typically when the session ID is missing or key derivation fails.
PropertyTypeValue
codestringELICITATION_ENCRYPTION_ERROR
statusCodenumber500
isPublicbooleanfalse
originalErrorError | undefinedThe underlying cause
new ElicitationEncryptionError(message: string, originalError?: Error)

ElicitationSubscriptionError

Thrown when subscription to the elicitation pub/sub channel fails. This indicates a transport or infrastructure failure, not a user non-response (which would be a timeout).
PropertyTypeValue
codestringELICITATION_SUBSCRIPTION_ERROR
statusCodenumber500
isPublicbooleanfalse
elicitIdstringThe elicitation request ID
originalErrorError | undefinedThe underlying cause
new ElicitationSubscriptionError(elicitId: string, originalError?: Error)