pub struct IbridgeServer<M, C = NoCalendar, K = NoContacts> { /* private fields */ }Expand description
MCP server for one account.
At most four tool calls run at once. A read-only server omits write tools
from the tool list and rejects a direct write call. Calendar and reminders
tools appear once IbridgeServer::with_calendar gives the server a backend,
and contacts tools once IbridgeServer::with_contacts does.
Implementations§
Source§impl<M, C, K> IbridgeServer<M, C, K>where
M: MailApi + Send + Sync + 'static,
C: CalendarProvider + RemindersProvider + Send + Sync + 'static,
K: ContactsProvider + Send + Sync + 'static,
impl<M, C, K> IbridgeServer<M, C, K>where
M: MailApi + Send + Sync + 'static,
C: CalendarProvider + RemindersProvider + Send + Sync + 'static,
K: ContactsProvider + Send + Sync + 'static,
Sourcepub fn calendar_list_calendars_tool_attr() -> Tool
pub fn calendar_list_calendars_tool_attr() -> Tool
Generated tool metadata function for calendar_list_calendars
Sourcepub fn calendar_list_calendars(
&self,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn calendar_list_calendars( &self, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Lists calendars and says whether each holds events, tasks or both.
§Errors
Returns an MCP error when the calendars cannot be read.
Sourcepub fn calendar_list_events_tool_attr() -> Tool
pub fn calendar_list_events_tool_attr() -> Tool
Generated tool metadata function for calendar_list_events
Sourcepub fn calendar_list_events(
&self,
Parameters: Parameters<ListEventsParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn calendar_list_events( &self, Parameters: Parameters<ListEventsParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Lists events in a time range. Repeating events are expanded.
§Errors
Returns ErrorData::invalid_params when an id, the range or the page
size is not usable, and an MCP error when the events cannot be read.
Sourcepub fn calendar_get_event_tool_attr() -> Tool
pub fn calendar_get_event_tool_attr() -> Tool
Generated tool metadata function for calendar_get_event
Sourcepub fn calendar_get_event(
&self,
Parameters: Parameters<GetByIdParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn calendar_get_event( &self, Parameters: Parameters<GetByIdParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Fetches one event with its attendees and alarms.
§Errors
Returns ErrorData::invalid_params when the id is not usable, and an
MCP error when the event cannot be read.
Sourcepub fn calendar_create_event_tool_attr() -> Tool
pub fn calendar_create_event_tool_attr() -> Tool
Generated tool metadata function for calendar_create_event
Sourcepub fn calendar_create_event(
&self,
Parameters: Parameters<CreateEventParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn calendar_create_event( &self, Parameters: Parameters<CreateEventParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Creates an event. DTEND is always written.
§Errors
Returns ErrorData::invalid_params when the calendar id or a time is
not usable, and an MCP error when the event cannot be written.
Sourcepub fn calendar_update_event_tool_attr() -> Tool
pub fn calendar_update_event_tool_attr() -> Tool
Generated tool metadata function for calendar_update_event
Sourcepub fn calendar_update_event(
&self,
Parameters: Parameters<UpdateEventParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn calendar_update_event( &self, Parameters: Parameters<UpdateEventParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Changes an event when its ETag still matches.
§Errors
Returns ErrorData::invalid_params when an id, ETag or time is not
usable, and a tool error when the event changed since it was read.
Sourcepub fn calendar_delete_event_tool_attr() -> Tool
pub fn calendar_delete_event_tool_attr() -> Tool
Generated tool metadata function for calendar_delete_event
Sourcepub fn calendar_delete_event(
&self,
Parameters: Parameters<DeleteParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn calendar_delete_event( &self, Parameters: Parameters<DeleteParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Deletes an event when its ETag still matches.
§Errors
Returns ErrorData::invalid_params when the id or ETag is not
usable, and a tool error when the event changed since it was read.
Sourcepub fn reminders_list_lists_tool_attr() -> Tool
pub fn reminders_list_lists_tool_attr() -> Tool
Generated tool metadata function for reminders_list_lists
Sourcepub fn reminders_list_lists(
&self,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn reminders_list_lists( &self, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Lists reminder lists, and says that upgraded lists are out of reach.
§Errors
Returns an MCP error when the lists cannot be read.
Sourcepub fn reminders_list_tool_attr() -> Tool
pub fn reminders_list_tool_attr() -> Tool
Generated tool metadata function for reminders_list
Sourcepub fn reminders_list(
&self,
Parameters: Parameters<ListRemindersParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn reminders_list( &self, Parameters: Parameters<ListRemindersParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Lists reminders, open ones unless completed ones are asked for.
§Errors
Returns ErrorData::invalid_params when the list id or page size is
not usable, and an MCP error when the reminders cannot be read.
Sourcepub fn reminders_create_tool_attr() -> Tool
pub fn reminders_create_tool_attr() -> Tool
Generated tool metadata function for reminders_create
Sourcepub fn reminders_create(
&self,
Parameters: Parameters<CreateReminderParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn reminders_create( &self, Parameters: Parameters<CreateReminderParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Creates a reminder in a task list.
§Errors
Returns ErrorData::invalid_params when the list id, due date or
priority is not usable, and an MCP error when it cannot be written.
Sourcepub fn reminders_update_tool_attr() -> Tool
pub fn reminders_update_tool_attr() -> Tool
Generated tool metadata function for reminders_update
Sourcepub fn reminders_update(
&self,
Parameters: Parameters<UpdateReminderParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn reminders_update( &self, Parameters: Parameters<UpdateReminderParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Changes a reminder when its ETag still matches. Completing is an update.
§Errors
Returns ErrorData::invalid_params when an id, ETag, due date or
priority is not usable, and a tool error when the reminder changed.
Sourcepub fn reminders_delete_tool_attr() -> Tool
pub fn reminders_delete_tool_attr() -> Tool
Generated tool metadata function for reminders_delete
Sourcepub fn reminders_delete(
&self,
Parameters: Parameters<DeleteParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn reminders_delete( &self, Parameters: Parameters<DeleteParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Deletes a reminder when its ETag still matches.
§Errors
Returns ErrorData::invalid_params when the id or ETag is not
usable, and a tool error when the reminder changed since it was read.
Source§impl<M, C, K> IbridgeServer<M, C, K>where
M: MailApi + Send + Sync + 'static,
C: CalendarProvider + RemindersProvider + Send + Sync + 'static,
K: ContactsProvider + Send + Sync + 'static,
impl<M, C, K> IbridgeServer<M, C, K>where
M: MailApi + Send + Sync + 'static,
C: CalendarProvider + RemindersProvider + Send + Sync + 'static,
K: ContactsProvider + Send + Sync + 'static,
Sourcepub fn contacts_search_tool_attr() -> Tool
pub fn contacts_search_tool_attr() -> Tool
Generated tool metadata function for contacts_search
Sourcepub fn contacts_search(
&self,
Parameters: Parameters<SearchContactsParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn contacts_search( &self, Parameters: Parameters<SearchContactsParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Searches contacts by name, email address or phone number.
§Errors
Returns ErrorData::invalid_params when the query is empty or the
limit is above 100, and an MCP error when the search cannot be run.
Sourcepub fn contacts_get_tool_attr() -> Tool
pub fn contacts_get_tool_attr() -> Tool
Generated tool metadata function for contacts_get
Sourcepub fn contacts_get(
&self,
Parameters: Parameters<GetByIdParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn contacts_get( &self, Parameters: Parameters<GetByIdParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Fetches one contact in full.
§Errors
Returns ErrorData::invalid_params when the id is not usable, and an
MCP error when the contact cannot be read.
Sourcepub fn contacts_create_tool_attr() -> Tool
pub fn contacts_create_tool_attr() -> Tool
Generated tool metadata function for contacts_create
Sourcepub fn contacts_create(
&self,
Parameters: Parameters<CreateContactParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn contacts_create( &self, Parameters: Parameters<CreateContactParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Creates a contact.
§Errors
Returns ErrorData::invalid_params when the name is empty, and an MCP
error when the contact cannot be written.
Sourcepub fn contacts_update_tool_attr() -> Tool
pub fn contacts_update_tool_attr() -> Tool
Generated tool metadata function for contacts_update
Sourcepub fn contacts_update(
&self,
Parameters: Parameters<UpdateContactParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn contacts_update( &self, Parameters: Parameters<UpdateContactParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Changes a contact. Needs the current ETag.
§Errors
Returns ErrorData::invalid_params when the id or etag is not usable,
and an MCP error when the contact cannot be written.
Sourcepub fn contacts_delete_tool_attr() -> Tool
pub fn contacts_delete_tool_attr() -> Tool
Generated tool metadata function for contacts_delete
Sourcepub fn contacts_delete(
&self,
Parameters: Parameters<DeleteParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn contacts_delete( &self, Parameters: Parameters<DeleteParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Deletes a contact.
§Errors
Returns ErrorData::invalid_params when the id or etag is not usable,
and an MCP error when the contact cannot be deleted.
Sourcepub fn contacts_set_group_membership_tool_attr() -> Tool
pub fn contacts_set_group_membership_tool_attr() -> Tool
Generated tool metadata function for contacts_set_group_membership
Sourcepub fn contacts_set_group_membership(
&self,
Parameters: Parameters<SetGroupMembershipParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn contacts_set_group_membership( &self, Parameters: Parameters<SetGroupMembershipParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Adds a contact to a group or removes it.
§Errors
Returns ErrorData::invalid_params when an id or the action is not
usable, and an MCP error when the group cannot be rewritten.
Source§impl<M> IbridgeServer<M, NoCalendar, NoContacts>
impl<M> IbridgeServer<M, NoCalendar, NoContacts>
Sourcepub fn read_only(account: AccountSnapshot, mail: Arc<M>) -> Self
pub fn read_only(account: AccountSnapshot, mail: Arc<M>) -> Self
Hides write tools from the tool list and rejects write calls.
Sourcepub fn read_write(account: AccountSnapshot, mail: Arc<M>) -> Self
pub fn read_write(account: AccountSnapshot, mail: Arc<M>) -> Self
Shows read and write tools.
Source§impl<M, C, K> IbridgeServer<M, C, K>where
M: MailApi + Send + Sync + 'static,
C: CalendarProvider + RemindersProvider + Send + Sync + 'static,
K: ContactsProvider + Send + Sync + 'static,
impl<M, C, K> IbridgeServer<M, C, K>where
M: MailApi + Send + Sync + 'static,
C: CalendarProvider + RemindersProvider + Send + Sync + 'static,
K: ContactsProvider + Send + Sync + 'static,
Sourcepub fn with_calendar<C2>(self, calendar: Arc<C2>) -> IbridgeServer<M, C2, K>
pub fn with_calendar<C2>(self, calendar: Arc<C2>) -> IbridgeServer<M, C2, K>
Shows the calendar and reminders tools, backed by calendar.
Sourcepub fn with_contacts<K2>(self, contacts: Arc<K2>) -> IbridgeServer<M, C, K2>
pub fn with_contacts<K2>(self, contacts: Arc<K2>) -> IbridgeServer<M, C, K2>
Shows the contacts tools, backed by contacts.
Sourcepub fn with_downloads(self, dir: PathBuf) -> Self
pub fn with_downloads(self, dir: PathBuf) -> Self
Shows mail_save_attachment, which saves files into dir.
Only the local run modes call this. A hosted server never writes to disk.
Sourcepub fn without_contacts(self) -> Self
pub fn without_contacts(self) -> Self
Hides every contacts tool.
Sourcepub fn without_calendar(self) -> Self
pub fn without_calendar(self) -> Self
Hides every calendar and reminders tool.
Sourcepub fn without_mail(self) -> Self
pub fn without_mail(self) -> Self
Hides every mail tool. account_status stays.
Sourcepub const fn is_read_only(&self) -> bool
pub const fn is_read_only(&self) -> bool
Whether write tools are hidden.
Source§impl<M, C, K> IbridgeServer<M, C, K>where
M: MailApi + Send + Sync + 'static,
C: CalendarProvider + RemindersProvider + Send + Sync + 'static,
K: ContactsProvider + Send + Sync + 'static,
impl<M, C, K> IbridgeServer<M, C, K>where
M: MailApi + Send + Sync + 'static,
C: CalendarProvider + RemindersProvider + Send + Sync + 'static,
K: ContactsProvider + Send + Sync + 'static,
Sourcepub fn mail_list_mailboxes_tool_attr() -> Tool
pub fn mail_list_mailboxes_tool_attr() -> Tool
Generated tool metadata function for mail_list_mailboxes
Sourcepub fn mail_list_mailboxes(
&self,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn mail_list_mailboxes( &self, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Lists mailboxes with their roles and counts.
§Errors
Returns an MCP error when the mailbox list cannot be read.
Sourcepub fn mail_search_tool_attr() -> Tool
pub fn mail_search_tool_attr() -> Tool
Generated tool metadata function for mail_search
Sourcepub fn mail_search(
&self,
Parameters: Parameters<SearchParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn mail_search( &self, Parameters: Parameters<SearchParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Searches messages, newest first.
§Errors
Returns ErrorData::invalid_params when the page size is above 100
or a filter is not usable, and an MCP error when the search cannot be run.
Sourcepub fn mail_get_message_tool_attr() -> Tool
pub fn mail_get_message_tool_attr() -> Tool
Generated tool metadata function for mail_get_message
Sourcepub fn mail_get_message(
&self,
Parameters: Parameters<GetMessageParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn mail_get_message( &self, Parameters: Parameters<GetMessageParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Fetches one message, including its text and attachment list.
§Errors
Returns ErrorData::invalid_params when the id or offset is not usable,
and an MCP error when the message cannot be read.
Sourcepub fn mail_get_attachment_tool_attr() -> Tool
pub fn mail_get_attachment_tool_attr() -> Tool
Generated tool metadata function for mail_get_attachment
Sourcepub fn mail_get_attachment(
&self,
Parameters: Parameters<GetAttachmentParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn mail_get_attachment( &self, Parameters: Parameters<GetAttachmentParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Fetches one attachment as text or as a small inline file.
§Errors
Returns ErrorData::invalid_params when the id or offset is not usable,
and an MCP error when the part cannot be read.
Sourcepub fn mail_save_attachment_tool_attr() -> Tool
pub fn mail_save_attachment_tool_attr() -> Tool
Generated tool metadata function for mail_save_attachment
Sourcepub fn mail_save_attachment(
&self,
Parameters: Parameters<SaveAttachmentParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn mail_save_attachment( &self, Parameters: Parameters<SaveAttachmentParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Saves one attachment into the download folder and returns its path.
§Errors
Returns ErrorData::invalid_params when the id is not usable, and an MCP
error when the part cannot be read or the file cannot be written.
Sourcepub fn mail_create_draft_tool_attr() -> Tool
pub fn mail_create_draft_tool_attr() -> Tool
Generated tool metadata function for mail_create_draft
Sourcepub fn mail_create_draft(
&self,
Parameters: Parameters<SendParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn mail_create_draft( &self, Parameters: Parameters<SendParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Saves a draft in Drafts.
§Errors
Returns ErrorData::invalid_params when the draft is not usable,
and an MCP error when the draft cannot be saved.
Sourcepub fn mail_send_tool_attr() -> Tool
pub fn mail_send_tool_attr() -> Tool
Generated tool metadata function for mail_send
Sourcepub fn mail_send(
&self,
Parameters: Parameters<SendParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn mail_send( &self, Parameters: Parameters<SendParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Sends a message and saves a copy in Sent Messages.
A failed Sent copy is a warning on a successful send, not a failed send.
§Errors
Returns ErrorData::invalid_params when the message is not usable,
and an MCP error when SMTP refuses the message.
Sourcepub fn mail_move_tool_attr() -> Tool
pub fn mail_move_tool_attr() -> Tool
Generated tool metadata function for mail_move
Sourcepub fn mail_move(
&self,
Parameters: Parameters<MoveParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn mail_move( &self, Parameters: Parameters<MoveParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Moves a message to a mailbox or a role.
§Errors
Returns ErrorData::invalid_params when the destination is not usable,
and an MCP error when the move cannot be done.
Sourcepub fn mail_set_flags_tool_attr() -> Tool
pub fn mail_set_flags_tool_attr() -> Tool
Generated tool metadata function for mail_set_flags
Sourcepub fn mail_set_flags(
&self,
Parameters: Parameters<FlagParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn mail_set_flags( &self, Parameters: Parameters<FlagParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Sets or clears seen and flagged. The same call again changes nothing.
§Errors
Returns ErrorData::invalid_params when the id is not usable,
and an MCP error when the flags cannot be stored.
Sourcepub fn account_status_tool_attr() -> Tool
pub fn account_status_tool_attr() -> Tool
Generated tool metadata function for account_status
Sourcepub fn account_status(
&self,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
pub fn account_status( &self, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>
Reports the signed-in address, each service, and the server version.
§Errors
Returns an MCP error when the status cannot be built.
Trait Implementations§
Source§impl<M, C, K> Clone for IbridgeServer<M, C, K>
impl<M, C, K> Clone for IbridgeServer<M, C, K>
Source§impl<M, C, K> Debug for IbridgeServer<M, C, K>
impl<M, C, K> Debug for IbridgeServer<M, C, K>
Source§impl<M, C, K> ServerHandler for IbridgeServer<M, C, K>where
M: MailApi + Send + Sync + 'static,
C: CalendarProvider + RemindersProvider + Send + Sync + 'static,
K: ContactsProvider + Send + Sync + 'static,
impl<M, C, K> ServerHandler for IbridgeServer<M, C, K>where
M: MailApi + Send + Sync + 'static,
C: CalendarProvider + RemindersProvider + Send + Sync + 'static,
K: ContactsProvider + Send + Sync + 'static,
Source§async fn call_tool(
&self,
request: CallToolRequestParams,
context: RequestContext<RoleServer>,
) -> Result<CallToolResponse, ErrorData>
async fn call_tool( &self, request: CallToolRequestParams, context: RequestContext<RoleServer>, ) -> Result<CallToolResponse, ErrorData>
tools/call request from a client. Read moreasync fn list_tools( &self, _request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> Result<ListToolsResult, ErrorData>
fn get_info(&self) -> ServerConfig
fn ping( &self, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn initialize( &self, request: InitializeRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<InitializeResult, ErrorData>> + MaybeSendFuture
Source§fn negotiate_initialize(
&self,
request: &InitializeRequestParams,
) -> Result<InitializeResult, ErrorData>
fn negotiate_initialize( &self, request: &InitializeRequestParams, ) -> Result<InitializeResult, ErrorData>
initialize response for request, negotiating the
protocol version against Self::supported_protocol_versions. Read moreSource§fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
Source§fn discover(
&self,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<DiscoverResult, ErrorData>> + MaybeSendFuture
fn discover( &self, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<DiscoverResult, ErrorData>> + MaybeSendFuture
fn complete( &self, request: CompleteRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<CompleteResult, ErrorData>> + MaybeSendFuture
fn set_level( &self, request: SetLevelRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn get_prompt( &self, request: GetPromptRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<GetPromptResponse, ErrorData>> + MaybeSendFuture
fn list_prompts( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListPromptsResult, ErrorData>> + MaybeSendFuture
fn list_resources( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListResourcesResult, ErrorData>> + MaybeSendFuture
fn list_resource_templates( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListResourceTemplatesResult, ErrorData>> + MaybeSendFuture
fn read_resource( &self, request: ReadResourceRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ReadResourceResponse, ErrorData>> + MaybeSendFuture
Source§fn accepted_subscription_filter(
&self,
requested: &SubscriptionFilter,
) -> Option<SubscriptionFilter>
fn accepted_subscription_filter( &self, requested: &SubscriptionFilter, ) -> Option<SubscriptionFilter>
Source§fn listen(
&self,
context: SubscriptionContext,
) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn listen( &self, context: SubscriptionContext, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
Source§fn subscribe(
&self,
request: SubscribeRequestParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn subscribe( &self, request: SubscribeRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
resources/subscribe is legacy-only; implement accepted_subscription_filter and listen for protocol version 2026-07-28
Source§fn unsubscribe(
&self,
request: UnsubscribeRequestParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn unsubscribe( &self, request: UnsubscribeRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
resources/unsubscribe is legacy-only; subscriptions/listen is cancelled through its request lifecycle
fn on_custom_request( &self, request: CustomRequest, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<CustomResult, ErrorData>> + MaybeSendFuture
fn on_cancelled( &self, notification: CancelledNotificationParam, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn on_progress( &self, notification: ProgressNotificationParam, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn on_initialized( &self, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn on_roots_list_changed( &self, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn on_custom_notification( &self, notification: CustomNotification, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
Source§fn get_task(
&self,
request: GetTaskParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<GetTaskResult, ErrorData>> + MaybeSendFuture
fn get_task( &self, request: GetTaskParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<GetTaskResult, ErrorData>> + MaybeSendFuture
tasks/get: return the current DetailedTask state.Source§fn update_task(
&self,
request: UpdateTaskParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn update_task( &self, request: UpdateTaskParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
tasks/update: accept responses to outstanding in-task
input requests. Returns an empty acknowledgement on success.Source§fn cancel_task(
&self,
request: CancelTaskParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn cancel_task( &self, request: CancelTaskParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
tasks/cancel: cooperative cancellation. Returns an empty
acknowledgement; the task’s observable status may lag.Source§fn list_skills(
&self,
request: Option<PaginatedRequestParams>,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<ListSkillsResult, ErrorData>> + MaybeSendFuture
fn list_skills( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListSkillsResult, ErrorData>> + MaybeSendFuture
skills/list: one page of the skills this server serves.Source§fn get_skill(
&self,
request: GetSkillRequestParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<GetSkillResult, ErrorData>> + MaybeSendFuture
fn get_skill( &self, request: GetSkillRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<GetSkillResult, ErrorData>> + MaybeSendFuture
skills/get: the entry for one skill, or -32602 when the
server does not serve a skill at that URI.Source§fn read_resource_directory(
&self,
request: ReadResourceDirectoryRequestParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<ListResourcesResult, ErrorData>> + MaybeSendFuture
fn read_resource_directory( &self, request: ReadResourceDirectoryRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListResourcesResult, ErrorData>> + MaybeSendFuture
resources/directory/read: the direct children of a
directory resource, or -32602 when the URI is not a directory.Auto Trait Implementations§
impl<M, C = NoCalendar, K = NoContacts> !RefUnwindSafe for IbridgeServer<M, C, K>
impl<M, C = NoCalendar, K = NoContacts> !UnwindSafe for IbridgeServer<M, C, K>
impl<M, C, K> Forget for IbridgeServer<M, C, K>
impl<M, C, K> Freeze for IbridgeServer<M, C, K>
impl<M, C, K> Move for IbridgeServer<M, C, K>
impl<M, C, K> Send for IbridgeServer<M, C, K>
impl<M, C, K> Sync for IbridgeServer<M, C, K>
impl<M, C, K> Unpin for IbridgeServer<M, C, K>
impl<M, C, K> UnsafeUnpin for IbridgeServer<M, C, K>where
Arc<M>: UnsafeUnpin,
Arc<C>: UnsafeUnpin,
Arc<K>: UnsafeUnpin,
ToolRouter<IbridgeServer<M, C, K>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<R, S> DynService<R> for Swhere
R: ServiceRole,
S: Service<R>,
impl<R, S> DynService<R> for Swhere
R: ServiceRole,
S: Service<R>,
fn handle_request( &self, request: <R as ServiceRole>::PeerReq, context: RequestContext<R>, ) -> Pin<Box<dyn Future<Output = Result<<R as ServiceRole>::Resp, ErrorData>> + Send + '_>>
fn handle_notification( &self, notification: <R as ServiceRole>::PeerNot, context: NotificationContext<R>, ) -> Pin<Box<dyn Future<Output = Result<(), ErrorData>> + Send + '_>>
fn get_info(&self) -> <R as ServiceRole>::Info
Source§fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<H> Service<RoleServer> for Hwhere
H: ServerHandler,
impl<H> Service<RoleServer> for Hwhere
H: ServerHandler,
async fn handle_request( &self, request: <RoleServer as ServiceRole>::PeerReq, context: RequestContext<RoleServer>, ) -> Result<<RoleServer as ServiceRole>::Resp, ErrorData>
async fn handle_notification( &self, notification: <RoleServer as ServiceRole>::PeerNot, context: NotificationContext<RoleServer>, ) -> Result<(), ErrorData>
fn get_info(&self) -> <RoleServer as ServiceRole>::Info
Source§fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
initialize
negotiation may agree to. Read moreSource§impl<S> ServiceExt<RoleServer> for Swhere
S: Service<RoleServer>,
impl<S> ServiceExt<RoleServer> for Swhere
S: Service<RoleServer>,
Source§fn serve_with_ct<T, E, A>(
self,
transport: T,
ct: CancellationToken,
) -> impl Future<Output = Result<RunningService<RoleServer, S>, ServerInitializeError>> + MaybeSendFuture
fn serve_with_ct<T, E, A>( self, transport: T, ct: CancellationToken, ) -> impl Future<Output = Result<RunningService<RoleServer, S>, ServerInitializeError>> + MaybeSendFuture
Source§fn into_dyn(self) -> Box<dyn DynService<R>>
fn into_dyn(self) -> Box<dyn DynService<R>>
Source§fn serve<T, E, A>(
self,
transport: T,
) -> impl Future<Output = Result<RunningService<R, Self>, <R as ServiceRole>::InitializeError>> + MaybeSendFuture
fn serve<T, E, A>( self, transport: T, ) -> impl Future<Output = Result<RunningService<R, Self>, <R as ServiceRole>::InitializeError>> + MaybeSendFuture
transport and return a running service. Read more