5#ifndef PT_MCP_SERVICE_H
6#define PT_MCP_SERVICE_H
9#include <Pt/Mcp/ToolDeclaration.h>
10#include <Pt/Remoting/ServiceDefinition.h>
66 std::string dispatchToolsCall(
const std::string& json);
67 std::string dispatchInitialize(
const std::string& json);
68 std::string dispatchToolsList(
const std::string& json);
70 static std::string extractMethod(
const std::string& json);
71 static Pt::int64_t extractId(
const std::string& json);
Service(Remoting::ServiceDefinition &serviceDef, const ToolDeclaration &decl)
Creates a service for serviceDef and decl.
~Service()
Destroys the service.
void writeMessage(std::ostream &os, const std::string &json)
Writes a Content-Length framed message json to os.
std::string readMessage(std::istream &is)
Reads one Content-Length framed message from is.
std::string dispatch(const std::string &json)
Dispatches an MCP request and returns the response JSON.
Remote service definition.
Definition ServiceDefinition.h:59
int_type int64_t
Signed 64-bit integer type.
Definition Api-Types.h:59
Model Context Protocol (MCP) services.
Core module.
Definition Allocator.h:33