Skip to main content

systemprompt_identifiers/
mcp.rs

1//! MCP-protocol identifiers (server, execution, tool-call).
2//!
3//! `McpServerId` is the server's `services.yaml` key (its name) and
4//! `McpToolName` a tool name as the server declares it; both are checked
5//! non-empty names.
6//!
7//! Copyright (c) systemprompt.io — Business Source License 1.1.
8//! See <https://systemprompt.io> for licensing details.
9
10crate::define_id!(AiToolCallId, generate, schema);
11crate::define_id!(McpExecutionId, generate, schema);
12crate::define_id!(McpServerId, checked, |value| {
13    crate::macros::validate_non_empty("McpServerId", value)
14});
15crate::define_id!(McpToolName, checked, |value| {
16    crate::macros::validate_non_empty("McpToolName", value)
17});