@openagentid/mcp/errors
API contract shipped by @openagentid/mcp 0.1.1. Exact exports, signatures, dependencies and availability.
All packages · Runnable examples · Start an agent
| Contract | Value |
|---|---|
| Package | @openagentid/mcp@0.1.1 |
| Entry point | @openagentid/mcp/errors |
| Availability | Earlier SDK compatibility |
| Reference source | Published TypeScript declarations |
| Package engines | node >=20 |
Before integrating
Declares an optional peer on @openagentid/sdk ^0.1.0, which excludes SDK 0.7.2. Reference describes the published contract; do not assume compatibility with the current SDK.
This reference is generated from the integrity-verified npm archive for this exact version. Signatures describe the public contract; they are not standalone programs. Complete examples are checked separately.
Import conditions
Use the public entry point above. The package resolves it to these shipped files; do not import its internal files directly.
| Condition | Published file |
|---|---|
| types | ./dist/errors.d.ts |
| import | ./dist/errors.js |
| require | ./dist/errors.cjs |
Exports
AuthorizationDeniedErrorIdentityVerificationErrorMcpErrorCodeMcpErrorCodeValue— typeMissingIdentityErrorOpenAgentMcpErrorSkillsPolicyDeniedError
AuthorizationDeniedError
Caller's verified identity does not hold the required scopes.
declare class AuthorizationDeniedError extends OpenAgentMcpError {
constructor(toolName: string, requiredScopes: ReadonlyArray<string>, heldScopes: ReadonlyArray<string>);
}Source: @openagentid/mcp@0.1.1, dist/errors.d.ts:56.
IdentityVerificationError
Identity envelope was present but the verifier rejected it.
declare class IdentityVerificationError extends OpenAgentMcpError {
constructor(toolName: string, cause: unknown);
}Source: @openagentid/mcp@0.1.1, dist/errors.d.ts:52.
McpErrorCode
Standard JSON-RPC + MCP error codes used by the middleware.
declare const McpErrorCode: {
readonly InvalidRequest: -32600;
readonly MethodNotFound: -32601;
readonly InvalidParams: -32602;
readonly InternalError: -32603;
readonly ServerError: -32000;
readonly AuthenticationFailed: -32001;
readonly AuthorizationDenied: -32002;
readonly SkillsPolicyDenied: -32003;
};Source: @openagentid/mcp@0.1.1, dist/errors.d.ts:10.
McpErrorCodeValue
Type-only declaration; it is not a runtime value.
type McpErrorCodeValue = (typeof McpErrorCode)[keyof typeof McpErrorCode];Source: @openagentid/mcp@0.1.1, dist/errors.d.ts:28.
MissingIdentityError
Caller did not present an OpenAgent identity envelope.
declare class MissingIdentityError extends OpenAgentMcpError {
constructor(toolName: string);
}Source: @openagentid/mcp@0.1.1, dist/errors.d.ts:48.
OpenAgentMcpError
Base class for all middleware errors. Subclasses set a default {@link OpenAgentMcpError.code} that maps to a JSON-RPC error code.
declare class OpenAgentMcpError extends Error {
readonly code: McpErrorCodeValue;
readonly data?: Record<string, unknown>;
constructor(message: string, code: McpErrorCodeValue, data?: Record<string, unknown>);
toJsonRpcError(): {
code: McpErrorCodeValue;
message: string;
data?: Record<string, unknown>;
};
}Source: @openagentid/mcp@0.1.1, dist/errors.d.ts:33.
SkillsPolicyDeniedError
Skills policy hook returned allow: false.
declare class SkillsPolicyDeniedError extends OpenAgentMcpError {
constructor(toolName: string, reason: string | undefined);
}Source: @openagentid/mcp@0.1.1, dist/errors.d.ts:60.
Package requirements
Peer dependencies
| Package | Published range | Optional |
|---|---|---|
| @modelcontextprotocol/sdk | ^1.27.0 | No |
| @openagentid/sdk | ^0.1.0 | Yes |
Archive verification
Pinned integrity:
sha512-Kquw9MiLgfnmX5w7RK3FK1SYKcexe5wKJk8DtlOnEaN8k/0Z+WytXkEFWwj+W4+E9ug708jwfKHFlAjdNYSUWA==