Class: Telnyx::Resources::AI::Missions::McpServers
- Inherits:
-
Object
- Object
- Telnyx::Resources::AI::Missions::McpServers
- Defined in:
- lib/telnyx/resources/ai/missions/mcp_servers.rb,
sig/telnyx/resources/ai/missions/mcp_servers.rbs
Instance Method Summary collapse
-
#create_mcp_server(mission_id, request_options: {}) ⇒ Object
Adds an MCP server to the specified mission, making the server's tools available to agents during runs of this mission.
-
#delete_mcp_server(mcp_server_id, mission_id:, request_options: {}) ⇒ nil
Removes the specified MCP server from the mission, revoking agent access to its tools in subsequent runs.
-
#get_mcp_server(mcp_server_id, mission_id:, request_options: {}) ⇒ Object
Returns the configuration of a single MCP server attached to the specified mission.
-
#initialize(client:) ⇒ McpServers
constructor
private
A new instance of McpServers.
-
#list_mcp_servers(mission_id, request_options: {}) ⇒ Object
Returns the MCP servers configured on the specified mission.
-
#update_mcp_server(mcp_server_id, mission_id:, request_options: {}) ⇒ Object
Replaces the configuration of the specified MCP server on this mission.
Constructor Details
#initialize(client:) ⇒ McpServers
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of McpServers.
136 137 138 |
# File 'lib/telnyx/resources/ai/missions/mcp_servers.rb', line 136 def initialize(client:) @client = client end |
Instance Method Details
#create_mcp_server(mission_id, request_options: {}) ⇒ Object
Adds an MCP server to the specified mission, making the server's tools available to agents during runs of this mission.
20 21 22 23 24 25 26 27 |
# File 'lib/telnyx/resources/ai/missions/mcp_servers.rb', line 20 def create_mcp_server(mission_id, params = {}) @client.request( method: :post, path: ["ai/missions/%1$s/mcp-servers", mission_id], model: Telnyx::Internal::Type::Unknown, options: params[:request_options] ) end |
#delete_mcp_server(mcp_server_id, mission_id:, request_options: {}) ⇒ nil
Removes the specified MCP server from the mission, revoking agent access to its tools in subsequent runs.
43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/telnyx/resources/ai/missions/mcp_servers.rb', line 43 def delete_mcp_server(mcp_server_id, params) parsed, = Telnyx::AI::Missions::McpServerDeleteMcpServerParams.dump_request(params) mission_id = parsed.delete(:mission_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :delete, path: ["ai/missions/%1$s/mcp-servers/%2$s", mission_id, mcp_server_id], model: NilClass, options: ) end |
#get_mcp_server(mcp_server_id, mission_id:, request_options: {}) ⇒ Object
Returns the configuration of a single MCP server attached to the specified mission.
71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/telnyx/resources/ai/missions/mcp_servers.rb', line 71 def get_mcp_server(mcp_server_id, params) parsed, = Telnyx::AI::Missions::McpServerGetMcpServerParams.dump_request(params) mission_id = parsed.delete(:mission_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["ai/missions/%1$s/mcp-servers/%2$s", mission_id, mcp_server_id], model: Telnyx::Internal::Type::Unknown, options: ) end |
#list_mcp_servers(mission_id, request_options: {}) ⇒ Object
Returns the MCP servers configured on the specified mission. MCP servers expose external tools and data sources agents can use during runs.
97 98 99 100 101 102 103 104 |
# File 'lib/telnyx/resources/ai/missions/mcp_servers.rb', line 97 def list_mcp_servers(mission_id, params = {}) @client.request( method: :get, path: ["ai/missions/%1$s/mcp-servers", mission_id], model: Telnyx::Internal::Type::Unknown, options: params[:request_options] ) end |
#update_mcp_server(mcp_server_id, mission_id:, request_options: {}) ⇒ Object
Replaces the configuration of the specified MCP server on this mission.
119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/telnyx/resources/ai/missions/mcp_servers.rb', line 119 def update_mcp_server(mcp_server_id, params) parsed, = Telnyx::AI::Missions::McpServerUpdateMcpServerParams.dump_request(params) mission_id = parsed.delete(:mission_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :put, path: ["ai/missions/%1$s/mcp-servers/%2$s", mission_id, mcp_server_id], model: Telnyx::Internal::Type::Unknown, options: ) end |