MCP::Constants(3)

πŸ“¦
version 0.150.0 Β· 2 versions
, in opensuse-leap 16.0

πŸ¦‹ 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