pub struct McpServer {
sessions: Arc<SessionManager>,
tool_router: ToolRouter<Self>,
prompt_router: PromptRouter<Self>,
}Expand description
MCP server running every tool call on the Session shared by all MCP clients.
One instance is constructed per MCP connection or request by the
StreamableHttpService factory wired in main.rs. The
tool_router and prompt_router fields are built once at construction
time from the #[tool_router] / #[prompt_router] attribute macros
applied further down in this module.
Cheap to clone — only Arc and small router structs.
Fields§
§sessions: Arc<SessionManager>The session manager, to get the session shared by all MCP clients on each call.
tool_router: ToolRouter<Self>The router auto-generated from #[tool_router] annotations.
prompt_router: PromptRouter<Self>The router auto-generated from #[prompt_router] annotations.
Implementations§
Source§impl McpServer
impl McpServer
Sourceasync fn call_api<R: Request>(
&self,
tool_name: &str,
request: R,
) -> Result<CallToolResult, McpError>
async fn call_api<R: Request>( &self, tool_name: &str, request: R, ) -> Result<CallToolResult, McpError>
Runs a request of the API on the session. Requests running as jobs go through McpServer::call_job instead.
§Returns
The response as structured content, or the error as a tool error, so a failed request doesn’t end the MCP session.
Sourceasync fn call_job<R: Request>(
&self,
tool_name: &str,
request: R,
context: RequestContext<RoleServer>,
) -> Result<JobToolResponse, McpError>
async fn call_job<R: Request>( &self, tool_name: &str, request: R, context: RequestContext<RoleServer>, ) -> Result<JobToolResponse, McpError>
Runs a request of the API that runs as a job on the session.
§Returns
A task for the job if the client supports tasks. Otherwise, the state of the job after waiting for it a while, or its error as a tool error if it failed.
Source§impl McpServer
impl McpServer
Sourcepub fn session_status_tool_attr() -> Tool
pub fn session_status_tool_attr() -> Tool
Generated tool metadata function for session_status
pub fn session_status( &self, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn pack_info_tool_attr() -> Tool
pub fn pack_info_tool_attr() -> Tool
Generated tool metadata function for pack_info
pub fn pack_info( &self, params: Parameters<GetPackInfo>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn list_files_tool_attr() -> Tool
pub fn list_files_tool_attr() -> Tool
Generated tool metadata function for list_files
pub fn list_files( &self, params: Parameters<ListFiles>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn table_info_tool_attr() -> Tool
pub fn table_info_tool_attr() -> Tool
Generated tool metadata function for table_info
pub fn table_info( &self, params: Parameters<GetTableInfo>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn table_rows_tool_attr() -> Tool
pub fn table_rows_tool_attr() -> Tool
Generated tool metadata function for table_rows
pub fn table_rows( &self, params: Parameters<GetTableRows>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn table_definition_tool_attr() -> Tool
pub fn table_definition_tool_attr() -> Tool
Generated tool metadata function for table_definition
pub fn table_definition( &self, params: Parameters<GetTableDefinition>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn set_game_tool_attr() -> Tool
pub fn set_game_tool_attr() -> Tool
Generated tool metadata function for set_game
pub fn set_game( &self, params: Parameters<SetGame>, context: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<JobToolResponse, McpError>> + Send + '_>>
Sourcepub fn generate_dependencies_cache_tool_attr() -> Tool
pub fn generate_dependencies_cache_tool_attr() -> Tool
Generated tool metadata function for generate_dependencies_cache
pub fn generate_dependencies_cache( &self, params: Parameters<GenerateDependenciesCache>, context: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<JobToolResponse, McpError>> + Send + '_>>
Sourcepub fn rebuild_dependencies_tool_attr() -> Tool
pub fn rebuild_dependencies_tool_attr() -> Tool
Generated tool metadata function for rebuild_dependencies
pub fn rebuild_dependencies( &self, params: Parameters<RebuildDependencies>, context: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<JobToolResponse, McpError>> + Send + '_>>
Sourcepub fn dependency_tables_tool_attr() -> Tool
pub fn dependency_tables_tool_attr() -> Tool
Generated tool metadata function for dependency_tables
pub fn dependency_tables( &self, params: Parameters<ListDependencyTables>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn run_diagnostics_tool_tool_attr() -> Tool
pub fn run_diagnostics_tool_tool_attr() -> Tool
Generated tool metadata function for run_diagnostics
pub fn run_diagnostics_tool( &self, params: Parameters<RunDiagnostics>, context: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<JobToolResponse, McpError>> + Send + '_>>
Sourcepub fn list_diagnostics_tool_attr() -> Tool
pub fn list_diagnostics_tool_attr() -> Tool
Generated tool metadata function for list_diagnostics
pub fn list_diagnostics( &self, params: Parameters<ListDiagnostics>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn ignore_diagnostics_tool_attr() -> Tool
pub fn ignore_diagnostics_tool_attr() -> Tool
Generated tool metadata function for ignore_diagnostics
pub fn ignore_diagnostics( &self, params: Parameters<IgnoreDiagnostics>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn run_search_tool_attr() -> Tool
pub fn run_search_tool_attr() -> Tool
Generated tool metadata function for run_search
pub fn run_search( &self, params: Parameters<RunSearch>, context: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<JobToolResponse, McpError>> + Send + '_>>
Sourcepub fn list_search_matches_tool_attr() -> Tool
pub fn list_search_matches_tool_attr() -> Tool
Generated tool metadata function for list_search_matches
pub fn list_search_matches( &self, params: Parameters<ListSearchMatches>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn replace_search_matches_tool_attr() -> Tool
pub fn replace_search_matches_tool_attr() -> Tool
Generated tool metadata function for replace_search_matches
pub fn replace_search_matches( &self, params: Parameters<ReplaceSearchMatches>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn column_values_tool_attr() -> Tool
pub fn column_values_tool_attr() -> Tool
Generated tool metadata function for column_values
pub fn column_values( &self, params: Parameters<GetColumnValues>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn unused_numbers_tool_attr() -> Tool
pub fn unused_numbers_tool_attr() -> Tool
Generated tool metadata function for unused_numbers
pub fn unused_numbers( &self, params: Parameters<GetUnusedNumbers>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn find_definition_tool_attr() -> Tool
pub fn find_definition_tool_attr() -> Tool
Generated tool metadata function for find_definition
pub fn find_definition( &self, params: Parameters<FindDefinition>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn find_usages_tool_attr() -> Tool
pub fn find_usages_tool_attr() -> Tool
Generated tool metadata function for find_usages
pub fn find_usages( &self, params: Parameters<FindUsages>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn find_loc_tool_attr() -> Tool
pub fn find_loc_tool_attr() -> Tool
Generated tool metadata function for find_loc
pub fn find_loc( &self, params: Parameters<FindLoc>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn loc_source_tool_attr() -> Tool
pub fn loc_source_tool_attr() -> Tool
Generated tool metadata function for loc_source
pub fn loc_source( &self, params: Parameters<GetLocSource>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn row_locs_tool_attr() -> Tool
pub fn row_locs_tool_attr() -> Tool
Generated tool metadata function for row_locs
pub fn row_locs( &self, params: Parameters<GetRowLocs>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn pack_settings_tool_attr() -> Tool
pub fn pack_settings_tool_attr() -> Tool
Generated tool metadata function for pack_settings
pub fn pack_settings( &self, params: Parameters<GetPackSettings>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn update_pack_settings_tool_attr() -> Tool
pub fn update_pack_settings_tool_attr() -> Tool
Generated tool metadata function for update_pack_settings
pub fn update_pack_settings( &self, params: Parameters<UpdatePackSettings>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn list_notes_tool_attr() -> Tool
pub fn list_notes_tool_attr() -> Tool
Generated tool metadata function for list_notes
pub fn list_notes( &self, params: Parameters<ListNotes>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn add_note_tool_attr() -> Tool
pub fn add_note_tool_attr() -> Tool
Generated tool metadata function for add_note
pub fn add_note( &self, params: Parameters<AddNote>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn delete_note_tool_attr() -> Tool
pub fn delete_note_tool_attr() -> Tool
Generated tool metadata function for delete_note
pub fn delete_note( &self, params: Parameters<DeleteNote>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn schema_tables_tool_attr() -> Tool
pub fn schema_tables_tool_attr() -> Tool
Generated tool metadata function for schema_tables
pub fn schema_tables( &self, params: Parameters<ListSchemaTables>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn patch_column_tool_attr() -> Tool
pub fn patch_column_tool_attr() -> Tool
Generated tool metadata function for patch_column
pub fn patch_column( &self, params: Parameters<PatchColumn>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn remove_patches_tool_attr() -> Tool
pub fn remove_patches_tool_attr() -> Tool
Generated tool metadata function for remove_patches
pub fn remove_patches( &self, params: Parameters<RemovePatches>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn update_schemas_tool_attr() -> Tool
pub fn update_schemas_tool_attr() -> Tool
Generated tool metadata function for update_schemas
pub fn update_schemas( &self, params: Parameters<UpdateSchemas>, context: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<JobToolResponse, McpError>> + Send + '_>>
Sourcepub fn update_schema_from_assembly_kit_tool_attr() -> Tool
pub fn update_schema_from_assembly_kit_tool_attr() -> Tool
Generated tool metadata function for update_schema_from_assembly_kit
pub fn update_schema_from_assembly_kit( &self, params: Parameters<UpdateSchemaFromAssemblyKit>, context: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<JobToolResponse, McpError>> + Send + '_>>
Sourcepub fn merge_tables_tool_attr() -> Tool
pub fn merge_tables_tool_attr() -> Tool
Generated tool metadata function for merge_tables
pub fn merge_tables( &self, params: Parameters<MergeTables>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn upgrade_table_tool_attr() -> Tool
pub fn upgrade_table_tool_attr() -> Tool
Generated tool metadata function for upgrade_table
pub fn upgrade_table( &self, params: Parameters<UpgradeTable>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn rename_key_tool_attr() -> Tool
pub fn rename_key_tool_attr() -> Tool
Generated tool metadata function for rename_key
pub fn rename_key( &self, params: Parameters<RenameKey>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn add_key_deletes_tool_attr() -> Tool
pub fn add_key_deletes_tool_attr() -> Tool
Generated tool metadata function for add_key_deletes
pub fn add_key_deletes( &self, params: Parameters<AddKeyDeletes>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn export_tsv_tool_attr() -> Tool
pub fn export_tsv_tool_attr() -> Tool
Generated tool metadata function for export_tsv
pub fn export_tsv( &self, params: Parameters<ExportTsv>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn import_tsv_tool_attr() -> Tool
pub fn import_tsv_tool_attr() -> Tool
Generated tool metadata function for import_tsv
pub fn import_tsv( &self, params: Parameters<ImportTsv>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn optimizer_options_tool_attr() -> Tool
pub fn optimizer_options_tool_attr() -> Tool
Generated tool metadata function for optimizer_options
pub fn optimizer_options( &self, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn patch_siege_ai_tool_attr() -> Tool
pub fn patch_siege_ai_tool_attr() -> Tool
Generated tool metadata function for patch_siege_ai
pub fn patch_siege_ai( &self, params: Parameters<PatchSiegeAi>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn pack_map_tool_attr() -> Tool
pub fn pack_map_tool_attr() -> Tool
Generated tool metadata function for pack_map
pub fn pack_map( &self, params: Parameters<PackMap>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn generate_missing_locs_tool_attr() -> Tool
pub fn generate_missing_locs_tool_attr() -> Tool
Generated tool metadata function for generate_missing_locs
pub fn generate_missing_locs( &self, params: Parameters<GenerateMissingLocs>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn update_anim_ids_tool_attr() -> Tool
pub fn update_anim_ids_tool_attr() -> Tool
Generated tool metadata function for update_anim_ids
pub fn update_anim_ids( &self, params: Parameters<UpdateAnimIds>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn anims_by_skeleton_tool_attr() -> Tool
pub fn anims_by_skeleton_tool_attr() -> Tool
Generated tool metadata function for anims_by_skeleton
pub fn anims_by_skeleton( &self, params: Parameters<AnimsBySkeleton>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn export_gltf_tool_attr() -> Tool
pub fn export_gltf_tool_attr() -> Tool
Generated tool metadata function for export_gltf
pub fn export_gltf( &self, params: Parameters<ExportGltf>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn set_video_format_tool_attr() -> Tool
pub fn set_video_format_tool_attr() -> Tool
Generated tool metadata function for set_video_format
pub fn set_video_format( &self, params: Parameters<SetVideoFormat>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn live_export_tool_attr() -> Tool
pub fn live_export_tool_attr() -> Tool
Generated tool metadata function for live_export
pub fn live_export( &self, params: Parameters<LiveExport>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn init_mymod_tool_attr() -> Tool
pub fn init_mymod_tool_attr() -> Tool
Generated tool metadata function for init_mymod
pub fn init_mymod( &self, params: Parameters<InitMyMod>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn startpos_campaigns_tool_attr() -> Tool
pub fn startpos_campaigns_tool_attr() -> Tool
Generated tool metadata function for startpos_campaigns
pub fn startpos_campaigns( &self, params: Parameters<GetStartposCampaigns>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn start_startpos_tool_attr() -> Tool
pub fn start_startpos_tool_attr() -> Tool
Generated tool metadata function for start_startpos
pub fn start_startpos( &self, params: Parameters<StartStartpos>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn finish_startpos_tool_attr() -> Tool
pub fn finish_startpos_tool_attr() -> Tool
Generated tool metadata function for finish_startpos
pub fn finish_startpos( &self, params: Parameters<FinishStartpos>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn validate_startpos_tool_attr() -> Tool
pub fn validate_startpos_tool_attr() -> Tool
Generated tool metadata function for validate_startpos
pub fn validate_startpos( &self, params: Parameters<ValidateStartpos>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn generate_startpos_tool_attr() -> Tool
pub fn generate_startpos_tool_attr() -> Tool
Generated tool metadata function for generate_startpos
pub fn generate_startpos( &self, params: Parameters<GenerateStartpos>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn extract_startpos_tables_tool_attr() -> Tool
pub fn extract_startpos_tables_tool_attr() -> Tool
Generated tool metadata function for extract_startpos_tables
pub fn extract_startpos_tables( &self, params: Parameters<ExtractStartposTables>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn keep_startpos_campaign_tool_attr() -> Tool
pub fn keep_startpos_campaign_tool_attr() -> Tool
Generated tool metadata function for keep_startpos_campaign
pub fn keep_startpos_campaign( &self, params: Parameters<KeepStartposCampaign>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn compare_startpos_tables_tool_attr() -> Tool
pub fn compare_startpos_tables_tool_attr() -> Tool
Generated tool metadata function for compare_startpos_tables
pub fn compare_startpos_tables( &self, params: Parameters<CompareStartposTables>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn optimize_pack_tool_attr() -> Tool
pub fn optimize_pack_tool_attr() -> Tool
Generated tool metadata function for optimize_pack
pub fn optimize_pack( &self, params: Parameters<OptimizePack>, context: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<JobToolResponse, McpError>> + Send + '_>>
Sourcepub fn run_lua_tests_tool_attr() -> Tool
pub fn run_lua_tests_tool_attr() -> Tool
Generated tool metadata function for run_lua_tests
pub fn run_lua_tests( &self, params: Parameters<RunLuaTests>, context: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<JobToolResponse, McpError>> + Send + '_>>
Sourcepub fn check_update_tool_attr() -> Tool
pub fn check_update_tool_attr() -> Tool
Generated tool metadata function for check_update
pub fn check_update( &self, params: Parameters<CheckUpdate>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn apply_update_tool_attr() -> Tool
pub fn apply_update_tool_attr() -> Tool
Generated tool metadata function for apply_update
pub fn apply_update( &self, params: Parameters<ApplyUpdate>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn read_file_tool_attr() -> Tool
pub fn read_file_tool_attr() -> Tool
Generated tool metadata function for read_file
pub fn read_file( &self, params: Parameters<ReadFile>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn write_file_tool_attr() -> Tool
pub fn write_file_tool_attr() -> Tool
Generated tool metadata function for write_file
pub fn write_file( &self, params: Parameters<WriteFile>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn list_animpack_tool_attr() -> Tool
pub fn list_animpack_tool_attr() -> Tool
Generated tool metadata function for list_animpack
pub fn list_animpack( &self, params: Parameters<ListAnimPack>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn add_to_animpack_tool_attr() -> Tool
pub fn add_to_animpack_tool_attr() -> Tool
Generated tool metadata function for add_to_animpack
pub fn add_to_animpack( &self, params: Parameters<AddToAnimPack>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn extract_from_animpack_tool_attr() -> Tool
pub fn extract_from_animpack_tool_attr() -> Tool
Generated tool metadata function for extract_from_animpack
pub fn extract_from_animpack( &self, params: Parameters<ExtractFromAnimPack>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn delete_from_animpack_tool_attr() -> Tool
pub fn delete_from_animpack_tool_attr() -> Tool
Generated tool metadata function for delete_from_animpack
pub fn delete_from_animpack( &self, params: Parameters<DeleteFromAnimPack>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn raw_definitions_tool_attr() -> Tool
pub fn raw_definitions_tool_attr() -> Tool
Generated tool metadata function for raw_definitions
pub fn raw_definitions( &self, params: Parameters<GetRawDefinitions>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn set_definition_tool_attr() -> Tool
pub fn set_definition_tool_attr() -> Tool
Generated tool metadata function for set_definition
pub fn set_definition( &self, params: Parameters<SetDefinition>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn delete_definition_tool_attr() -> Tool
pub fn delete_definition_tool_attr() -> Tool
Generated tool metadata function for delete_definition
pub fn delete_definition( &self, params: Parameters<DeleteDefinition>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn referencing_columns_tool_attr() -> Tool
pub fn referencing_columns_tool_attr() -> Tool
Generated tool metadata function for referencing_columns
pub fn referencing_columns( &self, params: Parameters<GetReferencingColumns>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn table_patches_tool_attr() -> Tool
pub fn table_patches_tool_attr() -> Tool
Generated tool metadata function for table_patches
pub fn table_patches( &self, params: Parameters<GetTablePatches>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn missing_definitions_tool_attr() -> Tool
pub fn missing_definitions_tool_attr() -> Tool
Generated tool metadata function for missing_definitions
pub fn missing_definitions( &self, params: Parameters<GetMissingDefinitions>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn import_patches_tool_attr() -> Tool
pub fn import_patches_tool_attr() -> Tool
Generated tool metadata function for import_patches
pub fn import_patches( &self, params: Parameters<ImportPatches>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn reference_values_tool_attr() -> Tool
pub fn reference_values_tool_attr() -> Tool
Generated tool metadata function for reference_values
pub fn reference_values( &self, params: Parameters<GetReferenceValues>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn list_translations_tool_attr() -> Tool
pub fn list_translations_tool_attr() -> Tool
Generated tool metadata function for list_translations
pub fn list_translations( &self, params: Parameters<ListTranslations>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn generate_vanilla_texts_tool_attr() -> Tool
pub fn generate_vanilla_texts_tool_attr() -> Tool
Generated tool metadata function for generate_vanilla_texts
pub fn generate_vanilla_texts( &self, params: Parameters<GenerateVanillaTexts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn job_status_tool_attr() -> Tool
pub fn job_status_tool_attr() -> Tool
Generated tool metadata function for job_status
pub fn job_status( &self, params: Parameters<GetJobStatus>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn wait_for_job_tool_attr() -> Tool
pub fn wait_for_job_tool_attr() -> Tool
Generated tool metadata function for wait_for_job
pub fn wait_for_job( &self, params: Parameters<WaitForJob>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn cancel_job_tool_attr() -> Tool
pub fn cancel_job_tool_attr() -> Tool
Generated tool metadata function for cancel_job
pub fn cancel_job( &self, params: Parameters<CancelJob>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn new_pack_tool_attr() -> Tool
pub fn new_pack_tool_attr() -> Tool
Generated tool metadata function for new_pack
pub fn new_pack( &self, params: Parameters<NewPack>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn open_pack_tool_attr() -> Tool
pub fn open_pack_tool_attr() -> Tool
Generated tool metadata function for open_pack
pub fn open_pack( &self, params: Parameters<OpenPack>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn open_vanilla_packs_tool_attr() -> Tool
pub fn open_vanilla_packs_tool_attr() -> Tool
Generated tool metadata function for open_vanilla_packs
pub fn open_vanilla_packs( &self, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn close_pack_tool_attr() -> Tool
pub fn close_pack_tool_attr() -> Tool
Generated tool metadata function for close_pack
pub fn close_pack( &self, params: Parameters<ClosePack>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn close_all_packs_tool_attr() -> Tool
pub fn close_all_packs_tool_attr() -> Tool
Generated tool metadata function for close_all_packs
pub fn close_all_packs( &self, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn save_pack_tool_attr() -> Tool
pub fn save_pack_tool_attr() -> Tool
Generated tool metadata function for save_pack
pub fn save_pack( &self, params: Parameters<SavePack>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn update_pack_tool_attr() -> Tool
pub fn update_pack_tool_attr() -> Tool
Generated tool metadata function for update_pack
pub fn update_pack( &self, params: Parameters<UpdatePack>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn create_file_tool_attr() -> Tool
pub fn create_file_tool_attr() -> Tool
Generated tool metadata function for create_file
pub fn create_file( &self, params: Parameters<CreateFile>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn add_files_from_disk_tool_attr() -> Tool
pub fn add_files_from_disk_tool_attr() -> Tool
Generated tool metadata function for add_files_from_disk
pub fn add_files_from_disk( &self, params: Parameters<AddFilesFromDisk>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn copy_files_tool_attr() -> Tool
pub fn copy_files_tool_attr() -> Tool
Generated tool metadata function for copy_files
pub fn copy_files( &self, params: Parameters<CopyFiles>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn delete_files_tool_attr() -> Tool
pub fn delete_files_tool_attr() -> Tool
Generated tool metadata function for delete_files
pub fn delete_files( &self, params: Parameters<DeleteFiles>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn rename_files_tool_attr() -> Tool
pub fn rename_files_tool_attr() -> Tool
Generated tool metadata function for rename_files
pub fn rename_files( &self, params: Parameters<RenameFiles>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn duplicate_files_tool_attr() -> Tool
pub fn duplicate_files_tool_attr() -> Tool
Generated tool metadata function for duplicate_files
pub fn duplicate_files( &self, params: Parameters<DuplicateFiles>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn extract_files_tool_attr() -> Tool
pub fn extract_files_tool_attr() -> Tool
Generated tool metadata function for extract_files
pub fn extract_files( &self, params: Parameters<ExtractFiles>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn edit_table_tool_attr() -> Tool
pub fn edit_table_tool_attr() -> Tool
Generated tool metadata function for edit_table
pub fn edit_table( &self, params: Parameters<EditTable>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
pub fn new(sessions: Arc<SessionManager>) -> Self
fn tool_router() -> ToolRouter<Self>
Source§impl McpServer
impl McpServer
pub fn open_and_inspect_pack_prompt_attr() -> Prompt
pub fn open_and_inspect_pack( &self, ) -> Pin<Box<dyn Future<Output = Vec<PromptMessage>> + Send + '_>>
pub fn edit_db_table_prompt_attr() -> Prompt
pub fn edit_db_table( &self, ) -> Pin<Box<dyn Future<Output = Vec<PromptMessage>> + Send + '_>>
pub fn create_new_mod_prompt_attr() -> Prompt
pub fn create_new_mod( &self, ) -> Pin<Box<dyn Future<Output = Vec<PromptMessage>> + Send + '_>>
pub fn search_and_replace_prompt_attr() -> Prompt
pub fn search_and_replace( &self, ) -> Pin<Box<dyn Future<Output = Vec<PromptMessage>> + Send + '_>>
pub fn manage_dependencies_prompt_attr() -> Prompt
pub fn manage_dependencies( &self, ) -> Pin<Box<dyn Future<Output = Vec<PromptMessage>> + Send + '_>>
pub fn run_diagnostics_prompt_attr() -> Prompt
pub fn run_diagnostics( &self, ) -> Pin<Box<dyn Future<Output = Vec<PromptMessage>> + Send + '_>>
pub fn schema_operations_prompt_attr() -> Prompt
pub fn schema_operations( &self, ) -> Pin<Box<dyn Future<Output = Vec<PromptMessage>> + Send + '_>>
pub fn file_operations_prompt_attr() -> Prompt
pub fn file_operations( &self, ) -> Pin<Box<dyn Future<Output = Vec<PromptMessage>> + Send + '_>>
pub fn troubleshooting_prompt_attr() -> Prompt
pub fn troubleshooting( &self, ) -> Pin<Box<dyn Future<Output = Vec<PromptMessage>> + Send + '_>>
pub fn tsv_workflow_prompt_attr() -> Prompt
pub fn tsv_workflow( &self, ) -> Pin<Box<dyn Future<Output = Vec<PromptMessage>> + Send + '_>>
pub fn translation_workflow_prompt_attr() -> Prompt
pub fn translation_workflow( &self, ) -> Pin<Box<dyn Future<Output = Vec<PromptMessage>> + Send + '_>>
fn prompt_router() -> PromptRouter<McpServer>
Trait Implementations§
Source§impl ServerHandler for McpServer
impl ServerHandler for McpServer
Source§async fn call_tool(
&self,
request: CallToolRequestParams,
context: RequestContext<RoleServer>,
) -> Result<CallToolResponse, McpError>
async fn call_tool( &self, request: CallToolRequestParams, context: RequestContext<RoleServer>, ) -> Result<CallToolResponse, McpError>
Calls a tool, reporting params rmcp can’t parse like the API’s own invalid params, instead of as plain text.
Stops waiting for the tool if the client cancels the call, as rmcp drops its response. The request keeps running on the session.
Source§async fn cancel_task(
&self,
request: CancelTaskParams,
_context: RequestContext<RoleServer>,
) -> Result<(), McpError>
async fn cancel_task( &self, request: CancelTaskParams, _context: RequestContext<RoleServer>, ) -> Result<(), McpError>
Cancels the job of a task if it hasn’t started. Running jobs finish anyway, which tasks allow.
Source§async fn discover(
&self,
_context: RequestContext<RoleServer>,
) -> Result<DiscoverResult, McpError>
async fn discover( &self, _context: RequestContext<RoleServer>, ) -> Result<DiscoverResult, McpError>
async fn list_tools( &self, _request: Option<PaginatedRequestParams>, _context: RequestContext<RoleServer>, ) -> Result<ListToolsResult, McpError>
fn get_info(&self) -> ServerInfo
Source§async fn get_task(
&self,
request: GetTaskParams,
_context: RequestContext<RoleServer>,
) -> Result<GetTaskResult, McpError>
async fn get_task( &self, request: GetTaskParams, _context: RequestContext<RoleServer>, ) -> Result<GetTaskResult, McpError>
tasks/get: return the current [DetailedTask] state.async fn get_prompt( &self, request: GetPromptRequestParams, context: RequestContext<RoleServer>, ) -> Result<GetPromptResponse, McpError>
async fn list_prompts( &self, _request: Option<PaginatedRequestParams>, _context: RequestContext<RoleServer>, ) -> Result<ListPromptsResult, McpError>
async fn list_resources( &self, _request: Option<PaginatedRequestParams>, _context: RequestContext<RoleServer>, ) -> Result<ListResourcesResult, McpError>
async fn list_resource_templates( &self, _request: Option<PaginatedRequestParams>, _context: RequestContext<RoleServer>, ) -> Result<ListResourceTemplatesResult, McpError>
async fn read_resource( &self, request: ReadResourceRequestParams, _context: RequestContext<RoleServer>, ) -> Result<ReadResourceResponse, McpError>
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
§fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
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 accepted_subscription_filter(
&self,
requested: &SubscriptionFilter,
) -> Option<SubscriptionFilter>
fn accepted_subscription_filter( &self, requested: &SubscriptionFilter, ) -> Option<SubscriptionFilter>
§fn listen(
&self,
context: SubscriptionContext,
) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn listen( &self, context: SubscriptionContext, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
§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
§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
§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.Auto Trait Implementations§
impl !RefUnwindSafe for McpServer
impl !UnwindSafe for McpServer
impl Freeze for McpServer
impl Send for McpServer
impl Sync for McpServer
impl Unpin for McpServer
impl UnsafeUnpin for McpServer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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
§fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
Service::supported_protocol_versions].§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeSend for T
impl<T> MaybeSync for T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§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
§fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
initialize
negotiation may agree to. Read more§impl<S> ServiceExt<RoleServer> for Swhere
S: Service<RoleServer>,
impl<S> ServiceExt<RoleServer> for Swhere
S: Service<RoleServer>,
fn serve_with_ct<T, E, A>( self, transport: T, ct: CancellationToken, ) -> impl Future<Output = Result<RunningService<RoleServer, S>, ServerInitializeError>> + MaybeSendFuture
§fn into_dyn(self) -> Box<dyn DynService<R>>
fn into_dyn(self) -> Box<dyn DynService<R>>
fn serve<T, E, A>( self, transport: T, ) -> impl Future<Output = Result<RunningService<R, Self>, <R as ServiceRole>::InitializeError>> + MaybeSendFuture
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.