Class ContentServiceTools

java.lang.Object
org.saidone.unrest.mcp.ContentServiceTools

public class ContentServiceTools extends Object
MCP tools backed by ContentServiceClient.
  • Constructor Details

    • ContentServiceTools

      public ContentServiceTools()
  • Method Details

    • readContent

      @Tool(name="alfresco_read_content", description="Reads the content of an Alfresco document. By default returns its plain text (\'text\'), extracted by Alfresco from PDF, Office, HTML and the other formats it can convert; with binary=true returns the stored bytes base64-encoded (\'contentBase64\'). Long content comes in slices of at most maxBytes bytes: while \'hasMore\' is true, call again with offset = \'nextOffset\'. \'size\' is the total size in bytes (of the extracted text in text mode). FAILED_PRECONDITION means the document format cannot be converted to text.") public String readContent(@ToolParam(description="Node to read: a nodeRef (workspace://SpacesStore/<id>), a bare node id, or one of the aliases -root- (Company Home), -my- (user home folder), -shared- (Shared Files)") String nodeRef, @ToolParam(description="Return the stored bytes base64-encoded instead of the extracted text (default false)",required=false) Boolean binary, @ToolParam(description="Byte offset to start from: 0 for the beginning, then the nextOffset of the previous slice",required=false) Long offset, @ToolParam(description="Slice size in bytes, 1..2097152 (default 100000)",required=false) Integer maxBytes)
    • updateContent

      @Tool(name="alfresco_update_content", description="Replaces the content of an Alfresco document with text (\'content\') or base64 binary (\'contentBase64\'), then returns the document.") public String updateContent(@ToolParam(description="Node to read: a nodeRef (workspace://SpacesStore/<id>), a bare node id, or one of the aliases -root- (Company Home), -my- (user home folder), -shared- (Shared Files)") String nodeRef, @ToolParam(description="New text content (UTF-8)",required=false) String content, @ToolParam(description="New binary content encoded in base64",required=false) String contentBase64, @ToolParam(description="Mimetype; guessed from the document name when omitted",required=false) String mimetype)