API Reference¶
This page provides detailed API documentation for the Rossum MCP Server.
Server Module¶
Base Utilities¶
- class rossum_mcp.tools.base.GracefulListResult(items, skipped_ids=<factory>)[source]¶
Bases:
Generic[T]- __init__(items, skipped_ids=<factory>)¶
- rossum_mcp.tools.base.extract_id_from_url(url)[source]¶
Extract the integer resource ID from a Rossum API URL.
- Return type:
- rossum_mcp.tools.base.build_resource_url(base_url, resource_type, resource_id)[source]¶
Build a full URL for a Rossum API resource.
- Return type:
- rossum_mcp.tools.base.build_filters(**kwargs)[source]¶
Build a filter dict from kwargs, excluding None values.
- rossum_mcp.tools.base.filter_by_name_regex(items, name, use_regex)[source]¶
Apply client-side regex name filtering when use_regex is True.
- async rossum_mcp.tools.base.graceful_list(client, resource, resource_label, max_items=None, **filters)[source]¶
List resources gracefully, skipping items that fail deserialization.
Uses _http_client.fetch_all directly so that a single broken item does not terminate the entire iteration (the high-level client generators die on the first deserialization error).
- Return type:
Tool Catalog & Discovery¶
Tool Catalog¶
Category metadata for dynamic tool discovery.
Provides descriptions and keywords for tool categories. Tool membership and read_only status are derived from tags set on individual @mcp.tool decorators.
Discovery¶
Discovery tools for dynamic tool loading.
Provides MCP tool to explore available tool categories and their metadata. Tool lists are derived from tags on @mcp.tool decorators rather than a static catalog.
Resource Tracking¶
- rossum_mcp.tools.resource_tracking.track_resource(tracked, entity_type, entity_id, data)[source]¶
Append a side-effect resource to the tracked list.
Converts dataclass/dict data to a plain dict for serialization. Non-convertible data is silently skipped.
- Return type:
- rossum_mcp.tools.resource_tracking.embed_tracked_resources(result, tracked)[source]¶
Embed tracked resources into the tool result if any were collected.
If tracked is non-empty, converts the result to a dict (via dataclass asdict if needed) and adds the _tracked_resources key. Returns result unchanged if tracked is empty or result is not convertible.
- Return type:
Create Operations¶
Get Operations¶
- class rossum_mcp.tools.get.handler.EntityType(*values)[source]¶
Bases:
StrEnum- QUEUE = 'queue'¶
- SCHEMA = 'schema'¶
- HOOK = 'hook'¶
- ENGINE = 'engine'¶
- RULE = 'rule'¶
- USER = 'user'¶
- WORKSPACE = 'workspace'¶
- EMAIL_TEMPLATE = 'email_template'¶
- ORGANIZATION_GROUP = 'organization_group'¶
- ANNOTATION = 'annotation'¶
- RELATION = 'relation'¶
- DOCUMENT_RELATION = 'document_relation'¶
- ORGANIZATION_LIMIT = 'organization_limit'¶
- HOOK_SECRETS_KEYS = 'hook_secrets_keys'¶
- class rossum_mcp.tools.get.registry.EntityConfig(retrieve_fn, search_fn)[source]¶
Bases:
object- __init__(retrieve_fn, search_fn)¶
- rossum_mcp.tools.get.registry.build_get_registry(client)[source]¶
Build registry with retrieve functions only (search_fn populated by search layer).
- Return type:
- class rossum_mcp.tools.get.models.SchemaTreeNode(id, label, category, type=None, required=False, hidden=False, children=None)[source]¶
Bases:
objectLightweight schema node for tree structure display.
- children: list[SchemaTreeNode] | None = None¶
- __init__(id, label, category, type=None, required=False, hidden=False, children=None)¶
Only meaningful for a few entities. Uses asyncio.gather for parallel fetches.
Search Operations¶
- type rossum_mcp.tools.search.registry.Timestamp = Annotated[str, "ISO 8601 timestamp (e.g., '2024-01-15T10:30:00Z')"]¶
- rossum_mcp.tools.search.registry.build_search_registry(client)[source]¶
Build a flat dict of entity -> search function.
- rossum_mcp.tools.search.registry.extract_search_kwargs(query)[source]¶
Extract filter kwargs from a search query model, dropping the entity discriminator.
Pydantic search query models for the unified search layer.
Each entity type has specific filter fields. The discriminated union on entity produces a JSON Schema oneOf, so the LLM sees valid filters per entity type.
- class rossum_mcp.tools.search.models.QueueSearch(**data)[source]¶
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class rossum_mcp.tools.search.models.SchemaSearch(**data)[source]¶
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class rossum_mcp.tools.search.models.HookSearch(**data)[source]¶
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class rossum_mcp.tools.search.models.EngineSearch(**data)[source]¶
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class rossum_mcp.tools.search.models.RuleSearch(**data)[source]¶
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class rossum_mcp.tools.search.models.UserSearch(**data)[source]¶
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class rossum_mcp.tools.search.models.WorkspaceSearch(**data)[source]¶
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class rossum_mcp.tools.search.models.EmailTemplateSearch(**data)[source]¶
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class rossum_mcp.tools.search.models.OrganizationGroupSearch(**data)[source]¶
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class rossum_mcp.tools.search.models.AnnotationSearch(**data)[source]¶
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class rossum_mcp.tools.search.models.RelationSearch(**data)[source]¶
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class rossum_mcp.tools.search.models.DocumentRelationSearch(**data)[source]¶
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class rossum_mcp.tools.search.models.HookLogSearch(**data)[source]¶
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class rossum_mcp.tools.search.models.HookTemplateSearch(**data)[source]¶
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class rossum_mcp.tools.search.models.UserRoleSearch(**data)[source]¶
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class rossum_mcp.tools.search.models.QueueTemplateNameSearch(**data)[source]¶
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class rossum_mcp.tools.search.models.QueueListItem(id, name, url, workspace=None, schema=None, inbox=None, connector=None, automation_enabled=False, automation_level='never', status=None, counts=None, settings='<omitted>')[source]¶
Bases:
objectQueue summary for list responses (settings omitted to save context).
- __init__(id, name, url, workspace=None, schema=None, inbox=None, connector=None, automation_enabled=False, automation_level='never', status=None, counts=None, settings='<omitted>')¶
- class rossum_mcp.tools.search.models.SchemaListItem(id, name=None, queues=None, url=None, content='<omitted>', metadata=None, modified_by=None, modified_at=None)[source]¶
Bases:
objectSchema summary for list responses (content omitted to save context).
- __init__(id, name=None, queues=None, url=None, content='<omitted>', metadata=None, modified_by=None, modified_at=None)¶
Update Operations¶
- class rossum_mcp.tools.update.models.SchemaNodeUpdate(label=None, type=None, score_threshold=None, hidden=None, disable_prediction=None, can_export=None, default_value=None, rir_field_names=None, constraints=None, options=None, ui_configuration=None, formula=None, prompt=None, context=None, matching=None, enum_value_type=None, width=None, stretch=None, min_occurrences=None, max_occurrences=None)[source]¶
Bases:
objectPartial update for an existing schema node.
Only include fields you want to update - all fields are optional.
- __init__(label=None, type=None, score_threshold=None, hidden=None, disable_prediction=None, can_export=None, default_value=None, rir_field_names=None, constraints=None, options=None, ui_configuration=None, formula=None, prompt=None, context=None, matching=None, enum_value_type=None, width=None, stretch=None, min_occurrences=None, max_occurrences=None)¶
- class rossum_mcp.tools.update.models.QueueUpdateData[source]¶
Bases:
TypedDict- automation_level: AutomationLevel¶
- locale: QueueLocale¶
Schema Updates¶
Schema update operations: update, patch, prune.
Schema patching utilities for Rossum MCP Server.
- class rossum_mcp.tools.update.schemas.patching.PatchOperation(*values)[source]¶
Bases:
StrEnum- ADD = 'add'¶
- UPDATE = 'update'¶
- REMOVE = 'remove'¶
- rossum_mcp.tools.update.schemas.patching.apply_schema_patch(content, operation, node_id, node_data=None, parent_id=None, position=None)[source]¶
Apply a patch operation to schema content.
Schema pruning utilities for removing fields from schema content.