Skip to content

Registry

OperatorRegistry

Bases: ToolRegistry

Source code in blue/operators/registry.py
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
class OperatorRegistry(ToolRegistry):
    def __init__(self, name="OPERATOR_REGISTRY", id=None, sid=None, cid=None, prefix=None, suffix=None, properties={}):
        """
        Initialize the OperatorRegistry.

        Parameters:
            name (str): Registry name. Default is "OPERATOR_REGISTRY".
            id (str, optional): Unique registry ID.
            sid (str, optional): Session ID.
            cid (str, optional): Context ID.
            prefix (str, optional): Registry key prefix.
            suffix (str, optional): Registry key suffix.
            properties (dict, optional): Additional registry configuration properties.
        """
        super().__init__(name=name, id=id, sid=sid, cid=cid, prefix=prefix, suffix=suffix, properties=properties)

    ######### server/operator
    def register_server_operator(self, server, operator, description="", properties={}, rebuild=False):
        """
        Register a new operator under a specific server.

        Parameters:
            server (str): Server name.
            operator (str): Operator name.
            description (str, optional): Description of the operator.
            properties (dict, optional): Operator metadata and configuration.
            rebuild (bool, optional): Whether to rebuild the search index after registration.
        """
        super().register_record(operator, 'operator', f'/server/{server}', description=description, properties=properties, rebuild=rebuild)

    def register_server_tool(self, server, tool, description="", properties={}, rebuild=False):
        """
        Alias for `register_server_operator`.

        Parameters:
            server (str): Server name.
            tool (str): Tool name.
            description (str, optional): Description of the tool.
            properties (dict, optional): Tool metadata and configuration.
            rebuild (bool, optional): Whether to rebuild the search index.
        """
        self.register_server_operator(server, tool, description=description, properties=properties, rebuild=rebuild)

    def update_server_operator(self, server, operator, description=None, icon=None, properties=None, rebuild=False):
        """
        Update the metadata or properties of an existing operator.

        Parameters:
            server (str): Server name.
            operator (str): Operator name.
            description (str, optional): New description text.
            icon (str, optional): Icon or visual identifier.
            properties (dict, optional): Updated property dictionary.
            rebuild (bool, optional): Whether to rebuild the index after update.
        """
        super().update_record(operator, 'operator', f'/server/{server}', description=description, icon=icon, properties=properties, rebuild=rebuild)

    def update_server_tool(self, server, tool, description=None, properties=None, rebuild=False):
        """
        Alias for `update_server_operator`.

        Parameters:
            server (str): Server name.
            tool (str): Tool name.
            description (str, optional): New description text.
            properties (dict, optional): Updated properties.
            rebuild (bool, optional): Whether to rebuild the index.
        """
        self.update_server_operator(server, tool, description=description, properties=properties, rebuild=rebuild)

    def deregister_server_operator(self, server, operator, rebuild=False):
        """
        Deregister (remove) an operator from a specific server.

        Parameters:
            server (str): Server name.
            operator (str): Operator name to remove.
            rebuild (bool, optional): Whether to rebuild the search index.
        """
        record = self.get_server_operator(server, operator)
        super().deregister(record, rebuild=rebuild)

    def deregister_server_tool(self, server, tool, rebuild=False):
        """
        Alias for `deregister_server_operator`.

        Parameters:
            server (str): Server name.
            tool (str): Tool name to remove.
            rebuild (bool, optional): Whether to rebuild the index.
        """
        self.deregister_server_operator(server, tool, rebuild=rebuild)

    def get_server_operators(self, server):
        """
        List all operators registered under a given server.

        Parameters:
            server (str): Server name.

        Returns:
            list[dict]: List of operator records.
        """
        return super().filter_record_contents(server, 'server', '/', filter_type='operator')

    def get_server_tools(self, server):
        """
        Alias for `get_server_operators`.

        Parameters:
            server (str): Server name.

        Returns:
            list[dict]: List of tools registered under the server.
        """
        return self.get_server_operators(server)

    def get_server_operator(self, server, operator):
        """
        Retrieve a single operator record from a given server.

        Parameters:
            server (str): Server name.
            operator (str): Operator name.

        Returns:
            dict | None: Operator record if found, otherwise None.
        """
        return super().filter_record_contents(server, 'server', '/', filter_type='operator', filter_name=operator, single=True)

    def get_server_tool(self, server, tool):
        """
        Alias for `get_server_operator`.

        Parameters:
            server (str): Server name.
            tool (str): Tool name.

        Returns:
            dict | None: Tool record if found.
        """
        return self.get_server_operator(server, tool)

    # description
    def get_server_operator_description(self, server, operator):
        """
        Retrieve the description text of a specific operator.

        Parameters:
            server (str): Server name.
            operator (str): Operator name.

        Returns:
            str | None: Description if available.
        """
        return super().get_record_description(operator, 'operator', f'/server/{server}')

    def get_server_tool_description(self, server, tool):
        """
        Alias for `get_server_operator_description`.

        Parameters:
            server (str): Server name.
            tool (str): Tool name.

        Returns:
            str | None: Description text if found.
        """
        return self.get_server_operator_description(server, tool)

    def set_server_operator_description(self, server, operator, description, rebuild=False):
        """
        Update the description of a server operator.

        Parameters:
            server (str): Server name.
            operator (str): Operator name.
            description (str): New description text.
            rebuild (bool, optional): Whether to rebuild the search index.
        """
        super().set_record_description(operator, 'operator', f'/server/{server}', description, rebuild=rebuild)

    def set_server_tool_description(self, server, tool, description, rebuild=False):
        """
        Alias for `set_server_operator_description`.

        Parameters:
            server (str): Server name.
            tool (str): Tool name.
            description (str): New description text.
            rebuild (bool, optional): Whether to rebuild the index.
        """
        self.set_server_operator_description(server, tool, description, rebuild=rebuild)

    # properties
    def get_server_operator_properties(self, server, operator):
        """
        Get the properties dictionary of a specific server operator.

        Parameters:
            server (str): Server name.
            operator (str): Operator name.

        Returns:
            dict | None: Operator properties.
        """
        return super().get_record_properties(operator, 'operator', f'/server/{server}')

    def get_server_tool_properties(self, server, tool):
        """
        Alias for `get_server_operator_properties`.

        Parameters:
            server (str): Server name.
            tool (str): Tool name.

        Returns:
            dict | None: Tool properties.
        """
        return self.get_server_operator_properties(server, tool)

    def get_server_operator_property(self, server, operator, key):
        """
        Retrieve a single property value of a server operator.

        Parameters:
            server (str): Server name.
            operator (str): Operator name.
            key (str): Property key.

        Returns:
            Any: Property value if found, else None.
        """
        return super().get_record_property(operator, 'operator', f'/server/{server}', key)

    def delete_server_operator_property(self, server, operator, key, rebuild=False):
        """
        Delete a specific property from a server operator.

        Parameters:
            server (str): Server name.
            operator (str): Operator name.
            key (str): Property key to remove.
            rebuild (bool, optional): Whether to rebuild the index after deletion.
        """
        super().delete_record_property(operator, 'operator', f'/server/{server}', key, rebuild=rebuild)

    def get_server_tool_property(self, server, tool, key):
        """
        Alias for `get_server_operator_property`.

        Parameters:
            server (str): Server name.
            tool (str): Tool name.
            key (str): Property key.

        Returns:
            Any: Property value if found.
        """
        return self.get_server_operator_property(server, tool, key)

    def set_server_operator_property(self, server, operator, key, value, rebuild=False):
        """
        Set or update a property of a server operator.

        Parameters:
            server (str): Server name.
            operator (str): Operator name.
            key (str): Property key.
            value (Any): Property value.
            rebuild (bool, optional): Whether to rebuild the index.
        """
        super().set_record_property(operator, 'operator', f'/server/{server}', key, value, rebuild=rebuild)

    def set_server_tool_property(self, server, tool, key, value, rebuild=False):
        """
        Alias for `set_server_operator_property`.

        Parameters:
            server (str): Server name.
            tool (str): Tool name.
            key (str): Property key.
            value (Any): Property value.
            rebuild (bool, optional): Whether to rebuild the index.
        """
        self.set_server_operator_property(server, tool, key, value, rebuild=rebuild)

    ######### sync
    def connect_server(self, server):
        """
        Establish a client connection to a given server.

        The connection protocol is determined from the server's stored
        properties under the "connection" key. Supported protocols include:
        - `local`
        - `ray`
        - `mcp`

        Parameters:
            server (str): Server name.

        Returns:
            object | None: Operator client instance if successful, else None.
        """
        connection = None

        properties = self.get_server_properties(server)

        if properties:
            if 'connection' in properties:
                connection_properties = properties["connection"]

                protocol = connection_properties["protocol"]
                if protocol:
                    if protocol == "local":
                        # import on demand
                        from blue.operators.clients.local_client import LocalOperatorClient
                        from blue.operators.clients import local_operators

                        connection = LocalOperatorClient(server, operators=local_operators.operators_dict, properties=properties)
                    elif protocol == "ray":
                        from blue.operators.clients.ray_client import RayOperatorClient
                        from blue.operators.clients import ray_operators

                        connection = RayOperatorClient(server, operators=ray_operators.operators_dict, properties=properties)
                    elif protocol == "mcp":
                        from blue.operators.clients.mcp_client import MCPOperatorClient

                        connection = MCPOperatorClient(server, properties=properties)

        return connection

    def execute_operator(self, operator, server, args, kwargs):
        """
        Execute a remote operator on a specific server.

        Parameters:
            operator (str): Operator name.
            server (str): Server name.
            args (list): Positional arguments.
            kwargs (dict): Keyword arguments.

        Returns:
            Any: Operator execution result, or None if connection unavailable.
        """
        connection = self.connect_server(server)
        if connection:
            return connection.execute_operator(operator, args, kwargs)
        else:
            return None

    def execute_tool(self, tool, server, args, kwargs):
        """
        Alias for `execute_operator`.

        Parameters:
            tool (str): Tool name.
            server (str): Server name.
            args (list): Positional arguments.
            kwargs (dict): Keyword arguments.

        Returns:
            Any: Tool execution result, or None if connection unavailable.
        """
        return self.execute_operator(tool, server, args, kwargs)

    def refine_operator(self, operator, server, args, kwargs):
        """
        Refine or adjust operator output using a remote server connection.

        Parameters:
            operator (str): Operator name.
            server (str): Server name.
            args (list): Positional arguments.
            kwargs (dict): Keyword arguments.

        Returns:
            list: Refined operator output, or empty list if unavailable.
        """
        connection = self.connect_server(server)
        if connection:
            return connection.refine_operator(operator, args, kwargs)
        else:
            return []

    def get_operator_attributes(self, operator, server):
        """
        Retrieve metadata or attributes of a given operator from a connected server.

        Parameters:
            operator (str): Operator name.
            server (str): Server name.

        Returns:
            list: List of operator attributes, or empty list if unavailable.
        """
        connection = self.connect_server(server)
        if connection:
            return connection.get_operator_attributes(operator)
        else:
            return []

__init__(name='OPERATOR_REGISTRY', id=None, sid=None, cid=None, prefix=None, suffix=None, properties={})

Initialize the OperatorRegistry.

Parameters:

Name Type Description Default
name str

Registry name. Default is "OPERATOR_REGISTRY".

'OPERATOR_REGISTRY'
id str

Unique registry ID.

None
sid str

Session ID.

None
cid str

Context ID.

None
prefix str

Registry key prefix.

None
suffix str

Registry key suffix.

None
properties dict

Additional registry configuration properties.

{}
Source code in blue/operators/registry.py
16
17
18
19
20
21
22
23
24
25
26
27
28
29
def __init__(self, name="OPERATOR_REGISTRY", id=None, sid=None, cid=None, prefix=None, suffix=None, properties={}):
    """
    Initialize the OperatorRegistry.

    Parameters:
        name (str): Registry name. Default is "OPERATOR_REGISTRY".
        id (str, optional): Unique registry ID.
        sid (str, optional): Session ID.
        cid (str, optional): Context ID.
        prefix (str, optional): Registry key prefix.
        suffix (str, optional): Registry key suffix.
        properties (dict, optional): Additional registry configuration properties.
    """
    super().__init__(name=name, id=id, sid=sid, cid=cid, prefix=prefix, suffix=suffix, properties=properties)

connect_server(server)

Establish a client connection to a given server.

The connection protocol is determined from the server's stored properties under the "connection" key. Supported protocols include: - local - ray - mcp

Parameters:

Name Type Description Default
server str

Server name.

required

Returns:

Type Description

object | None: Operator client instance if successful, else None.

Source code in blue/operators/registry.py
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
def connect_server(self, server):
    """
    Establish a client connection to a given server.

    The connection protocol is determined from the server's stored
    properties under the "connection" key. Supported protocols include:
    - `local`
    - `ray`
    - `mcp`

    Parameters:
        server (str): Server name.

    Returns:
        object | None: Operator client instance if successful, else None.
    """
    connection = None

    properties = self.get_server_properties(server)

    if properties:
        if 'connection' in properties:
            connection_properties = properties["connection"]

            protocol = connection_properties["protocol"]
            if protocol:
                if protocol == "local":
                    # import on demand
                    from blue.operators.clients.local_client import LocalOperatorClient
                    from blue.operators.clients import local_operators

                    connection = LocalOperatorClient(server, operators=local_operators.operators_dict, properties=properties)
                elif protocol == "ray":
                    from blue.operators.clients.ray_client import RayOperatorClient
                    from blue.operators.clients import ray_operators

                    connection = RayOperatorClient(server, operators=ray_operators.operators_dict, properties=properties)
                elif protocol == "mcp":
                    from blue.operators.clients.mcp_client import MCPOperatorClient

                    connection = MCPOperatorClient(server, properties=properties)

    return connection

delete_server_operator_property(server, operator, key, rebuild=False)

Delete a specific property from a server operator.

Parameters:

Name Type Description Default
server str

Server name.

required
operator str

Operator name.

required
key str

Property key to remove.

required
rebuild bool

Whether to rebuild the index after deletion.

False
Source code in blue/operators/registry.py
250
251
252
253
254
255
256
257
258
259
260
def delete_server_operator_property(self, server, operator, key, rebuild=False):
    """
    Delete a specific property from a server operator.

    Parameters:
        server (str): Server name.
        operator (str): Operator name.
        key (str): Property key to remove.
        rebuild (bool, optional): Whether to rebuild the index after deletion.
    """
    super().delete_record_property(operator, 'operator', f'/server/{server}', key, rebuild=rebuild)

deregister_server_operator(server, operator, rebuild=False)

Deregister (remove) an operator from a specific server.

Parameters:

Name Type Description Default
server str

Server name.

required
operator str

Operator name to remove.

required
rebuild bool

Whether to rebuild the search index.

False
Source code in blue/operators/registry.py
85
86
87
88
89
90
91
92
93
94
95
def deregister_server_operator(self, server, operator, rebuild=False):
    """
    Deregister (remove) an operator from a specific server.

    Parameters:
        server (str): Server name.
        operator (str): Operator name to remove.
        rebuild (bool, optional): Whether to rebuild the search index.
    """
    record = self.get_server_operator(server, operator)
    super().deregister(record, rebuild=rebuild)

deregister_server_tool(server, tool, rebuild=False)

Alias for deregister_server_operator.

Parameters:

Name Type Description Default
server str

Server name.

required
tool str

Tool name to remove.

required
rebuild bool

Whether to rebuild the index.

False
Source code in blue/operators/registry.py
 97
 98
 99
100
101
102
103
104
105
106
def deregister_server_tool(self, server, tool, rebuild=False):
    """
    Alias for `deregister_server_operator`.

    Parameters:
        server (str): Server name.
        tool (str): Tool name to remove.
        rebuild (bool, optional): Whether to rebuild the index.
    """
    self.deregister_server_operator(server, tool, rebuild=rebuild)

execute_operator(operator, server, args, kwargs)

Execute a remote operator on a specific server.

Parameters:

Name Type Description Default
operator str

Operator name.

required
server str

Server name.

required
args list

Positional arguments.

required
kwargs dict

Keyword arguments.

required

Returns:

Name Type Description
Any

Operator execution result, or None if connection unavailable.

Source code in blue/operators/registry.py
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
def execute_operator(self, operator, server, args, kwargs):
    """
    Execute a remote operator on a specific server.

    Parameters:
        operator (str): Operator name.
        server (str): Server name.
        args (list): Positional arguments.
        kwargs (dict): Keyword arguments.

    Returns:
        Any: Operator execution result, or None if connection unavailable.
    """
    connection = self.connect_server(server)
    if connection:
        return connection.execute_operator(operator, args, kwargs)
    else:
        return None

execute_tool(tool, server, args, kwargs)

Alias for execute_operator.

Parameters:

Name Type Description Default
tool str

Tool name.

required
server str

Server name.

required
args list

Positional arguments.

required
kwargs dict

Keyword arguments.

required

Returns:

Name Type Description
Any

Tool execution result, or None if connection unavailable.

Source code in blue/operators/registry.py
366
367
368
369
370
371
372
373
374
375
376
377
378
379
def execute_tool(self, tool, server, args, kwargs):
    """
    Alias for `execute_operator`.

    Parameters:
        tool (str): Tool name.
        server (str): Server name.
        args (list): Positional arguments.
        kwargs (dict): Keyword arguments.

    Returns:
        Any: Tool execution result, or None if connection unavailable.
    """
    return self.execute_operator(tool, server, args, kwargs)

get_operator_attributes(operator, server)

Retrieve metadata or attributes of a given operator from a connected server.

Parameters:

Name Type Description Default
operator str

Operator name.

required
server str

Server name.

required

Returns:

Name Type Description
list

List of operator attributes, or empty list if unavailable.

Source code in blue/operators/registry.py
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
def get_operator_attributes(self, operator, server):
    """
    Retrieve metadata or attributes of a given operator from a connected server.

    Parameters:
        operator (str): Operator name.
        server (str): Server name.

    Returns:
        list: List of operator attributes, or empty list if unavailable.
    """
    connection = self.connect_server(server)
    if connection:
        return connection.get_operator_attributes(operator)
    else:
        return []

get_server_operator(server, operator)

Retrieve a single operator record from a given server.

Parameters:

Name Type Description Default
server str

Server name.

required
operator str

Operator name.

required

Returns:

Type Description

dict | None: Operator record if found, otherwise None.

Source code in blue/operators/registry.py
132
133
134
135
136
137
138
139
140
141
142
143
def get_server_operator(self, server, operator):
    """
    Retrieve a single operator record from a given server.

    Parameters:
        server (str): Server name.
        operator (str): Operator name.

    Returns:
        dict | None: Operator record if found, otherwise None.
    """
    return super().filter_record_contents(server, 'server', '/', filter_type='operator', filter_name=operator, single=True)

get_server_operator_description(server, operator)

Retrieve the description text of a specific operator.

Parameters:

Name Type Description Default
server str

Server name.

required
operator str

Operator name.

required

Returns:

Type Description

str | None: Description if available.

Source code in blue/operators/registry.py
159
160
161
162
163
164
165
166
167
168
169
170
def get_server_operator_description(self, server, operator):
    """
    Retrieve the description text of a specific operator.

    Parameters:
        server (str): Server name.
        operator (str): Operator name.

    Returns:
        str | None: Description if available.
    """
    return super().get_record_description(operator, 'operator', f'/server/{server}')

get_server_operator_properties(server, operator)

Get the properties dictionary of a specific server operator.

Parameters:

Name Type Description Default
server str

Server name.

required
operator str

Operator name.

required

Returns:

Type Description

dict | None: Operator properties.

Source code in blue/operators/registry.py
210
211
212
213
214
215
216
217
218
219
220
221
def get_server_operator_properties(self, server, operator):
    """
    Get the properties dictionary of a specific server operator.

    Parameters:
        server (str): Server name.
        operator (str): Operator name.

    Returns:
        dict | None: Operator properties.
    """
    return super().get_record_properties(operator, 'operator', f'/server/{server}')

get_server_operator_property(server, operator, key)

Retrieve a single property value of a server operator.

Parameters:

Name Type Description Default
server str

Server name.

required
operator str

Operator name.

required
key str

Property key.

required

Returns:

Name Type Description
Any

Property value if found, else None.

Source code in blue/operators/registry.py
236
237
238
239
240
241
242
243
244
245
246
247
248
def get_server_operator_property(self, server, operator, key):
    """
    Retrieve a single property value of a server operator.

    Parameters:
        server (str): Server name.
        operator (str): Operator name.
        key (str): Property key.

    Returns:
        Any: Property value if found, else None.
    """
    return super().get_record_property(operator, 'operator', f'/server/{server}', key)

get_server_operators(server)

List all operators registered under a given server.

Parameters:

Name Type Description Default
server str

Server name.

required

Returns:

Type Description

list[dict]: List of operator records.

Source code in blue/operators/registry.py
108
109
110
111
112
113
114
115
116
117
118
def get_server_operators(self, server):
    """
    List all operators registered under a given server.

    Parameters:
        server (str): Server name.

    Returns:
        list[dict]: List of operator records.
    """
    return super().filter_record_contents(server, 'server', '/', filter_type='operator')

get_server_tool(server, tool)

Alias for get_server_operator.

Parameters:

Name Type Description Default
server str

Server name.

required
tool str

Tool name.

required

Returns:

Type Description

dict | None: Tool record if found.

Source code in blue/operators/registry.py
145
146
147
148
149
150
151
152
153
154
155
156
def get_server_tool(self, server, tool):
    """
    Alias for `get_server_operator`.

    Parameters:
        server (str): Server name.
        tool (str): Tool name.

    Returns:
        dict | None: Tool record if found.
    """
    return self.get_server_operator(server, tool)

get_server_tool_description(server, tool)

Alias for get_server_operator_description.

Parameters:

Name Type Description Default
server str

Server name.

required
tool str

Tool name.

required

Returns:

Type Description

str | None: Description text if found.

Source code in blue/operators/registry.py
172
173
174
175
176
177
178
179
180
181
182
183
def get_server_tool_description(self, server, tool):
    """
    Alias for `get_server_operator_description`.

    Parameters:
        server (str): Server name.
        tool (str): Tool name.

    Returns:
        str | None: Description text if found.
    """
    return self.get_server_operator_description(server, tool)

get_server_tool_properties(server, tool)

Alias for get_server_operator_properties.

Parameters:

Name Type Description Default
server str

Server name.

required
tool str

Tool name.

required

Returns:

Type Description

dict | None: Tool properties.

Source code in blue/operators/registry.py
223
224
225
226
227
228
229
230
231
232
233
234
def get_server_tool_properties(self, server, tool):
    """
    Alias for `get_server_operator_properties`.

    Parameters:
        server (str): Server name.
        tool (str): Tool name.

    Returns:
        dict | None: Tool properties.
    """
    return self.get_server_operator_properties(server, tool)

get_server_tool_property(server, tool, key)

Alias for get_server_operator_property.

Parameters:

Name Type Description Default
server str

Server name.

required
tool str

Tool name.

required
key str

Property key.

required

Returns:

Name Type Description
Any

Property value if found.

Source code in blue/operators/registry.py
262
263
264
265
266
267
268
269
270
271
272
273
274
def get_server_tool_property(self, server, tool, key):
    """
    Alias for `get_server_operator_property`.

    Parameters:
        server (str): Server name.
        tool (str): Tool name.
        key (str): Property key.

    Returns:
        Any: Property value if found.
    """
    return self.get_server_operator_property(server, tool, key)

get_server_tools(server)

Alias for get_server_operators.

Parameters:

Name Type Description Default
server str

Server name.

required

Returns:

Type Description

list[dict]: List of tools registered under the server.

Source code in blue/operators/registry.py
120
121
122
123
124
125
126
127
128
129
130
def get_server_tools(self, server):
    """
    Alias for `get_server_operators`.

    Parameters:
        server (str): Server name.

    Returns:
        list[dict]: List of tools registered under the server.
    """
    return self.get_server_operators(server)

refine_operator(operator, server, args, kwargs)

Refine or adjust operator output using a remote server connection.

Parameters:

Name Type Description Default
operator str

Operator name.

required
server str

Server name.

required
args list

Positional arguments.

required
kwargs dict

Keyword arguments.

required

Returns:

Name Type Description
list

Refined operator output, or empty list if unavailable.

Source code in blue/operators/registry.py
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
def refine_operator(self, operator, server, args, kwargs):
    """
    Refine or adjust operator output using a remote server connection.

    Parameters:
        operator (str): Operator name.
        server (str): Server name.
        args (list): Positional arguments.
        kwargs (dict): Keyword arguments.

    Returns:
        list: Refined operator output, or empty list if unavailable.
    """
    connection = self.connect_server(server)
    if connection:
        return connection.refine_operator(operator, args, kwargs)
    else:
        return []

register_server_operator(server, operator, description='', properties={}, rebuild=False)

Register a new operator under a specific server.

Parameters:

Name Type Description Default
server str

Server name.

required
operator str

Operator name.

required
description str

Description of the operator.

''
properties dict

Operator metadata and configuration.

{}
rebuild bool

Whether to rebuild the search index after registration.

False
Source code in blue/operators/registry.py
32
33
34
35
36
37
38
39
40
41
42
43
def register_server_operator(self, server, operator, description="", properties={}, rebuild=False):
    """
    Register a new operator under a specific server.

    Parameters:
        server (str): Server name.
        operator (str): Operator name.
        description (str, optional): Description of the operator.
        properties (dict, optional): Operator metadata and configuration.
        rebuild (bool, optional): Whether to rebuild the search index after registration.
    """
    super().register_record(operator, 'operator', f'/server/{server}', description=description, properties=properties, rebuild=rebuild)

register_server_tool(server, tool, description='', properties={}, rebuild=False)

Alias for register_server_operator.

Parameters:

Name Type Description Default
server str

Server name.

required
tool str

Tool name.

required
description str

Description of the tool.

''
properties dict

Tool metadata and configuration.

{}
rebuild bool

Whether to rebuild the search index.

False
Source code in blue/operators/registry.py
45
46
47
48
49
50
51
52
53
54
55
56
def register_server_tool(self, server, tool, description="", properties={}, rebuild=False):
    """
    Alias for `register_server_operator`.

    Parameters:
        server (str): Server name.
        tool (str): Tool name.
        description (str, optional): Description of the tool.
        properties (dict, optional): Tool metadata and configuration.
        rebuild (bool, optional): Whether to rebuild the search index.
    """
    self.register_server_operator(server, tool, description=description, properties=properties, rebuild=rebuild)

set_server_operator_description(server, operator, description, rebuild=False)

Update the description of a server operator.

Parameters:

Name Type Description Default
server str

Server name.

required
operator str

Operator name.

required
description str

New description text.

required
rebuild bool

Whether to rebuild the search index.

False
Source code in blue/operators/registry.py
185
186
187
188
189
190
191
192
193
194
195
def set_server_operator_description(self, server, operator, description, rebuild=False):
    """
    Update the description of a server operator.

    Parameters:
        server (str): Server name.
        operator (str): Operator name.
        description (str): New description text.
        rebuild (bool, optional): Whether to rebuild the search index.
    """
    super().set_record_description(operator, 'operator', f'/server/{server}', description, rebuild=rebuild)

set_server_operator_property(server, operator, key, value, rebuild=False)

Set or update a property of a server operator.

Parameters:

Name Type Description Default
server str

Server name.

required
operator str

Operator name.

required
key str

Property key.

required
value Any

Property value.

required
rebuild bool

Whether to rebuild the index.

False
Source code in blue/operators/registry.py
276
277
278
279
280
281
282
283
284
285
286
287
def set_server_operator_property(self, server, operator, key, value, rebuild=False):
    """
    Set or update a property of a server operator.

    Parameters:
        server (str): Server name.
        operator (str): Operator name.
        key (str): Property key.
        value (Any): Property value.
        rebuild (bool, optional): Whether to rebuild the index.
    """
    super().set_record_property(operator, 'operator', f'/server/{server}', key, value, rebuild=rebuild)

set_server_tool_description(server, tool, description, rebuild=False)

Alias for set_server_operator_description.

Parameters:

Name Type Description Default
server str

Server name.

required
tool str

Tool name.

required
description str

New description text.

required
rebuild bool

Whether to rebuild the index.

False
Source code in blue/operators/registry.py
197
198
199
200
201
202
203
204
205
206
207
def set_server_tool_description(self, server, tool, description, rebuild=False):
    """
    Alias for `set_server_operator_description`.

    Parameters:
        server (str): Server name.
        tool (str): Tool name.
        description (str): New description text.
        rebuild (bool, optional): Whether to rebuild the index.
    """
    self.set_server_operator_description(server, tool, description, rebuild=rebuild)

set_server_tool_property(server, tool, key, value, rebuild=False)

Alias for set_server_operator_property.

Parameters:

Name Type Description Default
server str

Server name.

required
tool str

Tool name.

required
key str

Property key.

required
value Any

Property value.

required
rebuild bool

Whether to rebuild the index.

False
Source code in blue/operators/registry.py
289
290
291
292
293
294
295
296
297
298
299
300
def set_server_tool_property(self, server, tool, key, value, rebuild=False):
    """
    Alias for `set_server_operator_property`.

    Parameters:
        server (str): Server name.
        tool (str): Tool name.
        key (str): Property key.
        value (Any): Property value.
        rebuild (bool, optional): Whether to rebuild the index.
    """
    self.set_server_operator_property(server, tool, key, value, rebuild=rebuild)

update_server_operator(server, operator, description=None, icon=None, properties=None, rebuild=False)

Update the metadata or properties of an existing operator.

Parameters:

Name Type Description Default
server str

Server name.

required
operator str

Operator name.

required
description str

New description text.

None
icon str

Icon or visual identifier.

None
properties dict

Updated property dictionary.

None
rebuild bool

Whether to rebuild the index after update.

False
Source code in blue/operators/registry.py
58
59
60
61
62
63
64
65
66
67
68
69
70
def update_server_operator(self, server, operator, description=None, icon=None, properties=None, rebuild=False):
    """
    Update the metadata or properties of an existing operator.

    Parameters:
        server (str): Server name.
        operator (str): Operator name.
        description (str, optional): New description text.
        icon (str, optional): Icon or visual identifier.
        properties (dict, optional): Updated property dictionary.
        rebuild (bool, optional): Whether to rebuild the index after update.
    """
    super().update_record(operator, 'operator', f'/server/{server}', description=description, icon=icon, properties=properties, rebuild=rebuild)

update_server_tool(server, tool, description=None, properties=None, rebuild=False)

Alias for update_server_operator.

Parameters:

Name Type Description Default
server str

Server name.

required
tool str

Tool name.

required
description str

New description text.

None
properties dict

Updated properties.

None
rebuild bool

Whether to rebuild the index.

False
Source code in blue/operators/registry.py
72
73
74
75
76
77
78
79
80
81
82
83
def update_server_tool(self, server, tool, description=None, properties=None, rebuild=False):
    """
    Alias for `update_server_operator`.

    Parameters:
        server (str): Server name.
        tool (str): Tool name.
        description (str, optional): New description text.
        properties (dict, optional): Updated properties.
        rebuild (bool, optional): Whether to rebuild the index.
    """
    self.update_server_operator(server, tool, description=description, properties=properties, rebuild=rebuild)
Last update: 2025-10-09