object

mcp_server_2026_07_28_spec

MCP 2026-07-28 protocol handler. Returns reply/1, reply_with_progress/2, subscribe/3, accepted, or no_reply outcomes. Does not write to streams; transports render outcomes.

Availability:
logtalk_load(mcp_server(loader))
Author: Paulo Moura
Version: 1:0:0
Date: 2026-09-02
Compilation flags:
static, context_switching_calls
Implements:
Imports:
Uses:
Remarks:
(none)

Public predicates

run_stdio_loop/3

Stdio read/dispatch loop. Called by the stdio transport.

Compilation flags:
static
Template:
run_stdio_loop(Input,Output,Options)
Mode and number of proofs:
run_stdio_loop(+stream,+stream,+list) - one

emit_progress/6

Buffers a notifications/progress event or invokes progress_hook/1 from current options.

Compilation flags:
static
Template:
emit_progress(Token,RequestId,Output,ProgressValue,Total,Message)
Mode and number of proofs:
emit_progress(+term,+term,+stream,+number,+number,+atom) - one

Protected predicates

(no local declarations; see entity ancestors if any)

Private predicates

output_stream_/1

Current output stream used for stdio rendering and subscription event fan-out.

Compilation flags:
dynamic
Template:
output_stream_(Stream)
Mode and number of proofs:
output_stream_(-stream) - zero_or_one

subscription_/3

Active subscription entry: identifier, opening request id, and filter list.

Compilation flags:
dynamic
Template:
subscription_(SubscriptionId,RequestId,Filters)
Mode and number of proofs:
subscription_(-atom,-nonvar,-list) - zero_or_more

running_/0

Flag set while the stdio server loop is active.

Compilation flags:
dynamic
Mode and number of proofs:
running_ - zero_or_one

reply_outcome_/1

Buffered abstract outcome (reply/1, subscribe/3, etc.) for the current request.

Compilation flags:
dynamic
Template:
reply_outcome_(Outcome)
Mode and number of proofs:
reply_outcome_(-nonvar) - zero_or_one

progress_buffer_/1

Buffered notifications/progress events for the current request (before final reply).

Compilation flags:
dynamic
Template:
progress_buffer_(Events)
Mode and number of proofs:
progress_buffer_(-list) - zero_or_one

current_options_/1

Merged options for the active prepare/handle session.

Compilation flags:
dynamic
Template:
current_options_(Options)
Mode and number of proofs:
current_options_(-list) - zero_or_one

Operators

(none)