Pt::Mcp Namespace Reference

Model Context Protocol (MCP) services. More...

Classes

class  ArrayType
 JSON array schema with one element type. More...
class  ContentFormatter
 Writer for one MCP content block around a Formatter. More...
class  ContentType
 Strategy that formats a tool result as MCP content. More...
class  EnumType
 String schema restricted to a fixed set of values. More...
class  HttpService
 HTTP service that serves declared MCP tools. More...
class  ImageContent
 Formats tool results as MCP image content. More...
class  NullableType
 Schema that accepts a type or JSON null. More...
class  ObjectType
 JSON object schema with named properties. More...
class  Property
 Named slot of an object schema or a tool parameter. More...
class  Service
 Synchronous MCP service over standard streams. More...
class  StdioService
 MCP service over standard streams with an event loop. More...
class  TextContent
 Formats tool results as MCP text content. More...
class  Tool
 One MCP tool in a server declaration. More...
class  ToolDeclaration
 MCP server name, version and tool catalog. More...
class  Type
 JSON Schema type for an MCP tool parameter. More...

Functions

PT_MCP_API const TextContenttextContent ()
 Returns the process-wide text content type.
PT_MCP_API const ImageContentimageContent ()
 Returns the process-wide PNG image content type.
PT_MCP_API const TypenullType ()
 Returns the process-wide JSON null schema type.
PT_MCP_API const TypeintegerType ()
 Returns the process-wide JSON integer schema type.
PT_MCP_API const TypenumberType ()
 Returns the process-wide JSON number schema type.
PT_MCP_API const TypestringType ()
 Returns the process-wide JSON string schema type.
PT_MCP_API const TypebooleanType ()
 Returns the process-wide JSON boolean schema type.

Detailed Description

An MCP server that exposes C++ procedures as tools. Parameter schemas, a tool catalog, result content, and HTTP or standard-I/O transport. Procedures live on Pt::Remoting::ServiceDefinition. Arguments and results must be serializable.