|
cMCP 0.4.1
Model Context Protocol library in pure C11
|
Umbrella header: package + protocol version macros, library- wide error codes, and cmcp_errstr.
More...
Go to the source code of this file.
Macros | |
| #define | CMCP_VERSION "0.10.0" |
| Package version of this cMCP build (e.g. | |
| #define | CMCP_PROTOCOL_VERSION "2025-11-25" |
| MCP wire-protocol revision this cMCP build speaks (e.g. | |
Enumerations | |
| enum | cmcp_err_t { CMCP_OK = 0 , CMCP_EINVAL = -1 , CMCP_ENOMEM = -2 , CMCP_EIO = -3 , CMCP_EPARSE = -4 , CMCP_ETRANSPORT = -5 , CMCP_EPROTOCOL = -6 , CMCP_ETIMEOUT = -7 , CMCP_ECANCELLED = -8 , CMCP_EUNSUPPORTED = -9 , CMCP_ESCHEMA = -10 , CMCP_ENOTFOUND = -11 , CMCP_EHANDLER = -12 , CMCP_EAGAIN = -13 } |
| Library-wide error codes. More... | |
Functions | |
| const char * | cmcp_errstr (int err) |
Return a human-readable label for a cmcp_err_t value. | |
Umbrella header: package + protocol version macros, library- wide error codes, and cmcp_errstr.
Every cMCP source file should include this header. The error codes declared here are returned by every public function whose return type is int (or cmcp_err_t) — negative values are errors, zero is success. See docs/SEMVER.md for the policy that governs additions and removals in this enum.
Definition in file cmcp.h.
| #define CMCP_VERSION "0.10.0" |
Package version of this cMCP build (e.g.
"0.8.0"). Independent of CMCP_PROTOCOL_VERSION — see docs/SEMVER.md.
| #define CMCP_PROTOCOL_VERSION "2025-11-25" |
| enum cmcp_err_t |
Library-wide error codes.
Negative on failure, zero on success.
Every public cMCP function returning int returns one of these (negative) on failure. Additions go at the end of the enum (so existing numeric encodings stay stable across MINOR bumps); see docs/SEMVER.md for the policy.
| const char * cmcp_errstr | ( | int | err | ) |
Return a human-readable label for a cmcp_err_t value.
Unknown values map to "unknown". Returned pointer is to a static string — never NULL, never needs freeing.
| err | A value of cmcp_err_t (or an int carrying one). |