MCP::Constants(3)
π¦ MCP::Constants β the manual page (Perl, section 3)
okay so this is MCP::Constants, a Perl module living in section 3 of the manual, and it's literally just constants for MCP β the Model Context Protocol. that's the whole vibe. it's a little bag of named values so you don't have to hardcode magic numbers and strings like a chaos gremlin π
β¨ NAME β¨
MCP::Constants β constants for MCP (Model Context Protocol). yes that's it. that's the name. iconic of it honestly.
πΈ SYNOPSIS πΈ
use MCP::Constants qw(PROTOCOL_VERSION);
that's the whole thing bestie, you just import the ones you want π«Ά
π DESCRIPTION π
MCP::Constants provides constants used in MCP (Model Context Protocol). lowkey that's the entire description and honestly? respect. it does one job and it slays at it β¨
π CONSTANTS π
MCP::Constants exports the following constants. here's the full lineup, no gatekeeping, no skips π
β HEADER_MISMATCH
the error code for a request whose routing headers disagree with its JSON-RPC body. like when the envelope says one thing and the letter inside says another β messy π
β INSUFFICIENT_SCOPE
the error code for a request whose access token lacks a required OAuth scope. heads up though, this one's a local authorization policy thing, not a spec-defined code β it lives in the -32000 to -32019 range that the specification grandfathers for existing SDK use. and -32020 to -32099? that's reserved for the specification itself, so like. don't touch π₯
β INTERNAL_ERROR
the error code for a prompt, resource, or tool that died, or returned a promise that was rejected. it fell over. it's not okay. it's giving π
β INVALID_PARAMS
the error code for invalid parameters. also used for prompts, resources, and tools that were not found. double duty, main character energy π
β INVALID_REQUEST
the error code for an invalid request. simple. clean. no notes.
β META_CLIENT_CAPABILITIES
the "_meta" key carrying the capabilities of the client making the request π¦
β META_CLIENT_INFO
the "_meta" key carrying the name and version of the client making the request πΈ
β META_LOG_LEVEL
the "_meta" key carrying the minimum log level the client wants to receive for a request π
β META_PROTOCOL_VERSION
the "_meta" key carrying the protocol version a request is made with β
β META_SERVER_INFO
the "_meta" key carrying the name and version of the server in a result π
β META_SUBSCRIPTION_ID
the "_meta" key carrying the subscription a notification belongs to π§
β METHOD_NOT_FOUND
the error code for a method that was not found. she's not here, babes π
β MISSING_CLIENT_CAPABILITY
the error code for a request that requires a client capability the client did not declare. you can't ask for a feature you never said you had, bestie π
β PARSE_ERROR
the error code for a parse error. it's giving unreadable π
β PROTOCOL_VERSION
the version of the Model Context Protocol being used. literally the whole point of the synopsis example above π
β SUPPORTED_VERSIONS
an array reference with every protocol version the server accepts, newest first. order matters, don't @ me β¨
β UNSUPPORTED_PROTOCOL_VERSION
the error code for a request made with a protocol version the server does not support π
π SEE ALSO π
go read them, they're worth it, iykyk π«Ά
ngl if you got this far you're a real one. go import some constants and build something cute π
okay that's the whole page!! this was perl v5.42.0, dated 2026-07-31, and you just read the MCP::Constants(3) manpage β slay, bye bestie!! πβ¨π¦
π¦ where this page comes from
- opensuse-leap 16.0: perl-MCP 0.150.0-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms