> For the complete documentation index, see [llms.txt](https://dev.guardian.hedera.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.guardian.hedera.com/static-spec-test/guardian-policies/tools.md).

# Tools

## Return a list of all tools.

> Returns all tools. Add Api-Version: 2 header to use search and tag filters. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ToolListV2ItemDTO":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","PUBLISHED","PUBLISH_ERROR"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string","nullable":true,"description":"Message ID (for PUBLISHED tools only)"}},"required":["id","name","description","status","creator","owner","topicId","messageId"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools":{"get":{"description":"Returns all tools. Add Api-Version: 2 header to use search and tag filters. Only users with the Standard Registry role are allowed to make the request.","operationId":"ToolsApi_getToolsV2_2","parameters":[{"name":"pageIndex","required":false,"in":"query","description":"The number of pages to skip before starting to collect the result set","schema":{"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"The numbers of items to return","schema":{"type":"number"}},{"name":"search","required":false,"in":"query","description":"Search","schema":{"type":"string"}},{"name":"tag","required":false,"in":"query","description":"Tag","schema":{"type":"string"}},{"name":"Api-Version","in":"header","description":"Use \"2\" for this endpoint (supports search, tag)","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation. Example shows V2 response format (no uuid, no hash).","headers":{"X-Total-Count":{"schema":{"type":"integer"},"description":"Total items in the collection."}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ToolListV2ItemDTO"}}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Return a list of all tools.","tags":["tools"]}}}}
```

## Creates a new tool (sync).

> Creates a new tool. Waits for completion and returns the created tool. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CreateToolDTO":{"type":"object","properties":{"name":{"type":"string","description":"Tool display name"},"description":{"type":"string","description":"Tool description"},"config":{"description":"Tool config. Must have blockType: \"tool\". May include id (UUID).","allOf":[{"$ref":"#/components/schemas/CreateToolConfigDTO"}]}},"required":["config"]},"CreateToolConfigDTO":{"type":"object","properties":{"id":{"type":"string","description":"Config block ID (UUID)"},"blockType":{"type":"string","enum":["tool"],"description":"Must be \"tool\""}},"required":["blockType"]},"ToolDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PUBLISHED","PUBLISH_ERROR"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string","nullable":true,"description":"Message ID (for PUBLISHED tools only; omitted or null for DRAFT)"},"codeVersion":{"type":"string"},"createDate":{"type":"string"},"updateDate":{"type":"string","description":"Last update date"},"configFileId":{"type":"string","description":"Config file ID (internal)"},"tagsTopicId":{"type":"string","description":"Tags topic ID (for PUBLISHED tools only)"},"contentFileId":{"type":"string","description":"File id of the original tool zip (imported from IPFS or publish flow). Present for PUBLISHED tools."},"hash":{"type":"string","description":"Hash (for PUBLISHED tools only)"},"tools":{"type":"array","items":{"type":"object"},"description":"Referenced sub-tools: { name, version?, topicId, messageId }"},"config":{"$ref":"#/components/schemas/ToolConfigResponseDTO"},"version":{"type":"string","nullable":true,"description":"Published tool version (e.g. 1.0.0); null or omitted when not published"}},"required":["id","uuid","name","description","status","creator","owner","topicId","codeVersion","createDate","updateDate","configFileId","tools","config"]},"ToolConfigResponseDTO":{"type":"object","properties":{"id":{"type":"string"},"blockType":{"type":"string","enum":["tool"]},"permissions":{"type":"array","items":{"type":"object"}},"children":{"type":"array","items":{"type":"object"}},"events":{"type":"array","items":{"type":"object"}},"artifacts":{"type":"array","items":{"type":"object"}},"variables":{"type":"array","items":{"type":"object"}},"inputEvents":{"type":"array","items":{"type":"object"}},"outputEvents":{"type":"array","items":{"type":"object"}},"innerEvents":{"type":"array","items":{"type":"object"}},"tag":{"type":"string"}},"required":["id","blockType"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools":{"post":{"description":"Creates a new tool. Waits for completion and returns the created tool. Only users with the Standard Registry role are allowed to make the request.","operationId":"ToolsApi_createNewTool","parameters":[],"requestBody":{"required":true,"description":"Tool configuration. Only config with blockType: \"tool\" is required. Other fields (name, description) are optional. Fields like id, uuid, creator, owner are set by the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateToolDTO"}}}},"responses":{"201":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Invalid tool config (missing config or config.blockType !== \"tool\").","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Creates a new tool (sync).","tags":["tools"]}}}}
```

## Creates a new tool (async).

> Creates a new tool asynchronously. Returns task ID for progress tracking. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CreateToolDTO":{"type":"object","properties":{"name":{"type":"string","description":"Tool display name"},"description":{"type":"string","description":"Tool description"},"config":{"description":"Tool config. Must have blockType: \"tool\". May include id (UUID).","allOf":[{"$ref":"#/components/schemas/CreateToolConfigDTO"}]}},"required":["config"]},"CreateToolConfigDTO":{"type":"object","properties":{"id":{"type":"string","description":"Config block ID (UUID)"},"blockType":{"type":"string","enum":["tool"],"description":"Must be \"tool\""}},"required":["blockType"]},"TaskDTO":{"type":"object","properties":{"taskId":{"type":"string","description":"Task Id"},"expectation":{"type":"number","description":"Expected count of task phases"},"action":{"type":"string","description":"Task action"},"userId":{"type":"string","description":"User Id"}},"required":["taskId","expectation","action","userId"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools/push":{"post":{"description":"Creates a new tool asynchronously. Returns task ID for progress tracking. Only users with the Standard Registry role are allowed to make the request.","operationId":"ToolsApi_createNewToolAsync","parameters":[],"requestBody":{"required":true,"description":"Tool configuration. Only config with blockType: \"tool\" is required. Other fields (name, description) are optional.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateToolDTO"}}}},"responses":{"202":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Invalid tool config (missing config or config.blockType !== \"tool\").","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Creates a new tool (async).","tags":["tools"]}}}}
```

## Retrieves tool configuration.

> Retrieves tool configuration for the specified tool ID. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ToolDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PUBLISHED","PUBLISH_ERROR"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string","nullable":true,"description":"Message ID (for PUBLISHED tools only; omitted or null for DRAFT)"},"codeVersion":{"type":"string"},"createDate":{"type":"string"},"updateDate":{"type":"string","description":"Last update date"},"configFileId":{"type":"string","description":"Config file ID (internal)"},"tagsTopicId":{"type":"string","description":"Tags topic ID (for PUBLISHED tools only)"},"contentFileId":{"type":"string","description":"File id of the original tool zip (imported from IPFS or publish flow). Present for PUBLISHED tools."},"hash":{"type":"string","description":"Hash (for PUBLISHED tools only)"},"tools":{"type":"array","items":{"type":"object"},"description":"Referenced sub-tools: { name, version?, topicId, messageId }"},"config":{"$ref":"#/components/schemas/ToolConfigResponseDTO"},"version":{"type":"string","nullable":true,"description":"Published tool version (e.g. 1.0.0); null or omitted when not published"}},"required":["id","uuid","name","description","status","creator","owner","topicId","codeVersion","createDate","updateDate","configFileId","tools","config"]},"ToolConfigResponseDTO":{"type":"object","properties":{"id":{"type":"string"},"blockType":{"type":"string","enum":["tool"]},"permissions":{"type":"array","items":{"type":"object"}},"children":{"type":"array","items":{"type":"object"}},"events":{"type":"array","items":{"type":"object"}},"artifacts":{"type":"array","items":{"type":"object"}},"variables":{"type":"array","items":{"type":"object"}},"inputEvents":{"type":"array","items":{"type":"object"}},"outputEvents":{"type":"array","items":{"type":"object"}},"innerEvents":{"type":"array","items":{"type":"object"}},"tag":{"type":"string"}},"required":["id","blockType"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools/{id}":{"get":{"description":"Retrieves tool configuration for the specified tool ID. Only users with the Standard Registry role are allowed to make the request.","operationId":"ToolsApi_getToolById","parameters":[{"name":"id","required":true,"in":"path","description":"Tool ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Invalid id (empty, \"undefined\", \"null\", or tool not found/not owned).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Retrieves tool configuration.","tags":["tools"]}}}}
```

## Updates tool configuration.

> Updates tool configuration for the specified tool ID. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ToolDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PUBLISHED","PUBLISH_ERROR"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string","nullable":true,"description":"Message ID (for PUBLISHED tools only; omitted or null for DRAFT)"},"codeVersion":{"type":"string"},"createDate":{"type":"string"},"updateDate":{"type":"string","description":"Last update date"},"configFileId":{"type":"string","description":"Config file ID (internal)"},"tagsTopicId":{"type":"string","description":"Tags topic ID (for PUBLISHED tools only)"},"contentFileId":{"type":"string","description":"File id of the original tool zip (imported from IPFS or publish flow). Present for PUBLISHED tools."},"hash":{"type":"string","description":"Hash (for PUBLISHED tools only)"},"tools":{"type":"array","items":{"type":"object"},"description":"Referenced sub-tools: { name, version?, topicId, messageId }"},"config":{"$ref":"#/components/schemas/ToolConfigResponseDTO"},"version":{"type":"string","nullable":true,"description":"Published tool version (e.g. 1.0.0); null or omitted when not published"}},"required":["id","uuid","name","description","status","creator","owner","topicId","codeVersion","createDate","updateDate","configFileId","tools","config"]},"ToolConfigResponseDTO":{"type":"object","properties":{"id":{"type":"string"},"blockType":{"type":"string","enum":["tool"]},"permissions":{"type":"array","items":{"type":"object"}},"children":{"type":"array","items":{"type":"object"}},"events":{"type":"array","items":{"type":"object"}},"artifacts":{"type":"array","items":{"type":"object"}},"variables":{"type":"array","items":{"type":"object"}},"inputEvents":{"type":"array","items":{"type":"object"}},"outputEvents":{"type":"array","items":{"type":"object"}},"innerEvents":{"type":"array","items":{"type":"object"}},"tag":{"type":"string"}},"required":["id","blockType"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools/{id}":{"put":{"description":"Updates tool configuration for the specified tool ID. Only users with the Standard Registry role are allowed to make the request.","operationId":"ToolsApi_updateTool","parameters":[{"name":"id","required":true,"in":"path","description":"Tool ID","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Tool configuration. Must include config with blockType: \"tool\". name and description are updatable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolDTO"}}}},"responses":{"201":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Invalid id or invalid tool config (missing config or config.blockType !== \"tool\").","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Updates tool configuration.","tags":["tools"]}}}}
```

## Deletes the tool with the provided tool ID. Only users with the Standard Registry role are allowed to make the request.

> Deletes the tool.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools/{id}":{"delete":{"description":"Deletes the tool.","operationId":"ToolsApi_deleteTool","parameters":[{"name":"id","required":true,"in":"path","description":"Tool ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"boolean"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Invalid id (empty, \"undefined\", \"null\", or tool not found/not owned/published).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Deletes the tool with the provided tool ID. Only users with the Standard Registry role are allowed to make the request.","tags":["tools"]}}}}
```

## Publishes the tool onto IPFS.

> Publishes the tool with the specified (internal) tool ID onto IPFS, sends a message featuring its IPFS CID into the corresponding Hedera topic. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ToolVersionDTO":{"type":"object","properties":{"toolVersion":{"type":"string"}},"required":["toolVersion"]},"ToolPublishResponseDTO":{"type":"object","properties":{"tool":{"$ref":"#/components/schemas/ToolDTO"},"isValid":{"type":"boolean","description":"Whether validation passed (true = tool published successfully)"},"errors":{"description":"Validation errors and block-level results","allOf":[{"$ref":"#/components/schemas/ValidationErrorsDTO"}]}},"required":["tool","isValid","errors"]},"ToolDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PUBLISHED","PUBLISH_ERROR"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string","nullable":true,"description":"Message ID (for PUBLISHED tools only; omitted or null for DRAFT)"},"codeVersion":{"type":"string"},"createDate":{"type":"string"},"updateDate":{"type":"string","description":"Last update date"},"configFileId":{"type":"string","description":"Config file ID (internal)"},"tagsTopicId":{"type":"string","description":"Tags topic ID (for PUBLISHED tools only)"},"contentFileId":{"type":"string","description":"File id of the original tool zip (imported from IPFS or publish flow). Present for PUBLISHED tools."},"hash":{"type":"string","description":"Hash (for PUBLISHED tools only)"},"tools":{"type":"array","items":{"type":"object"},"description":"Referenced sub-tools: { name, version?, topicId, messageId }"},"config":{"$ref":"#/components/schemas/ToolConfigResponseDTO"},"version":{"type":"string","nullable":true,"description":"Published tool version (e.g. 1.0.0); null or omitted when not published"}},"required":["id","uuid","name","description","status","creator","owner","topicId","codeVersion","createDate","updateDate","configFileId","tools","config"]},"ToolConfigResponseDTO":{"type":"object","properties":{"id":{"type":"string"},"blockType":{"type":"string","enum":["tool"]},"permissions":{"type":"array","items":{"type":"object"}},"children":{"type":"array","items":{"type":"object"}},"events":{"type":"array","items":{"type":"object"}},"artifacts":{"type":"array","items":{"type":"object"}},"variables":{"type":"array","items":{"type":"object"}},"inputEvents":{"type":"array","items":{"type":"object"}},"outputEvents":{"type":"array","items":{"type":"object"}},"innerEvents":{"type":"array","items":{"type":"object"}},"tag":{"type":"string"}},"required":["id","blockType"]},"ValidationErrorsDTO":{"type":"object","properties":{"blocks":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/BlockErrorsDTO"}},"errors":{"nullable":true,"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"infos":{"type":"array","items":{"type":"string"}},"id":{"type":"string","description":"Config block ID (for tool validation)"},"tools":{"type":"array","items":{"type":"object"},"description":"Tool-level errors (for tool validation)"},"isValid":{"type":"boolean","description":"Overall validation result (for tool validation)"}},"required":["blocks","errors","tools","isValid"]},"BlockErrorsDTO":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"infos":{"type":"array","items":{"type":"string"}},"isValid":{"type":"boolean"}},"required":["id","name","errors","isValid"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools/{id}/publish":{"put":{"description":"Publishes the tool with the specified (internal) tool ID onto IPFS, sends a message featuring its IPFS CID into the corresponding Hedera topic. Only users with the Standard Registry role are allowed to make the request.","operationId":"ToolsApi_publishTool","parameters":[{"name":"id","required":true,"in":"path","description":"Tool ID","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Tool version for publish. Required: toolVersion (e.g. \"1.0.0\").","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolVersionDTO"}}}},"responses":{"200":{"description":"Publish result (HTTP 200). If isValid is true, the tool was published. If isValid is false, the tool stays DRAFT and was not published — see errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolPublishResponseDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Request validation failed (e.g. missing or invalid toolVersion).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Publishes the tool onto IPFS.","tags":["tools"]}}}}
```

## Publishes the tool onto IPFS.

> Publishes the tool with the specified (internal) tool ID onto IPFS, sends a message featuring its IPFS CID into the corresponding Hedera topic. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ToolVersionDTO":{"type":"object","properties":{"toolVersion":{"type":"string"}},"required":["toolVersion"]},"TaskDTO":{"type":"object","properties":{"taskId":{"type":"string","description":"Task Id"},"expectation":{"type":"number","description":"Expected count of task phases"},"action":{"type":"string","description":"Task action"},"userId":{"type":"string","description":"User Id"}},"required":["taskId","expectation","action","userId"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools/{id}/push/publish":{"put":{"description":"Publishes the tool with the specified (internal) tool ID onto IPFS, sends a message featuring its IPFS CID into the corresponding Hedera topic. Only users with the Standard Registry role are allowed to make the request.","operationId":"ToolsApi_publishToolAsync","parameters":[{"name":"id","required":true,"in":"path","description":"Tool ID","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Tool version for publish. Required: toolVersion (e.g. \"1.0.0\").","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolVersionDTO"}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Request validation failed (e.g. missing or invalid toolVersion).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Publishes the tool onto IPFS.","tags":["tools"]}}}}
```

## Dry run tool.

> Validates the tool config; when valid, dry run starts (tool state updated server-side). Returns isValid and errors (no full tool body). Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ToolDryRunResponseDTO":{"type":"object","properties":{"isValid":{"type":"boolean","description":"Whether the tool config passed validation (true = dry run started; false = dry run not started)"},"errors":{"description":"Validation details (blocks, tools, common errors)","allOf":[{"$ref":"#/components/schemas/ValidationErrorsDTO"}]}},"required":["isValid","errors"]},"ValidationErrorsDTO":{"type":"object","properties":{"blocks":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/BlockErrorsDTO"}},"errors":{"nullable":true,"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"infos":{"type":"array","items":{"type":"string"}},"id":{"type":"string","description":"Config block ID (for tool validation)"},"tools":{"type":"array","items":{"type":"object"},"description":"Tool-level errors (for tool validation)"},"isValid":{"type":"boolean","description":"Overall validation result (for tool validation)"}},"required":["blocks","errors","tools","isValid"]},"BlockErrorsDTO":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"infos":{"type":"array","items":{"type":"string"}},"isValid":{"type":"boolean"}},"required":["id","name","errors","isValid"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools/{id}/dry-run":{"put":{"description":"Validates the tool config; when valid, dry run starts (tool state updated server-side). Returns isValid and errors (no full tool body). Only users with the Standard Registry role are allowed to make the request.","operationId":"ToolsApi_dryRunPolicy","parameters":[{"name":"id","required":true,"in":"path","description":"Tool ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Validation result (HTTP 200). Dry run started when isValid is true; dry run not started when isValid is false (see errors.blocks and nested messages).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolDryRunResponseDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Invalid id (empty or missing path segment).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Dry run tool.","tags":["tools"]}}}}
```

## Return tool to draft (editing).

> Sets the tool to DRAFT when allowed (not already DRAFT, not PUBLISHED, config present, not referenced by a policy in dry run). Response body is JSON \`true\`. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools/{id}/draft":{"put":{"description":"Sets the tool to DRAFT when allowed (not already DRAFT, not PUBLISHED, config present, not referenced by a policy in dry run). Response body is JSON `true`. Only users with the Standard Registry role are allowed to make the request.","operationId":"ToolsApi_draftPolicy","parameters":[{"name":"id","required":true,"in":"path","description":"Tool ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation. Response body is the JSON boolean `true`.","content":{"application/json":{"schema":{"type":"boolean"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Invalid id (empty or missing path segment).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Return tool to draft (editing).","tags":["tools"]}}}}
```

## Validates selected tool.

> Validates selected tool. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ToolDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PUBLISHED","PUBLISH_ERROR"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string","nullable":true,"description":"Message ID (for PUBLISHED tools only; omitted or null for DRAFT)"},"codeVersion":{"type":"string"},"createDate":{"type":"string"},"updateDate":{"type":"string","description":"Last update date"},"configFileId":{"type":"string","description":"Config file ID (internal)"},"tagsTopicId":{"type":"string","description":"Tags topic ID (for PUBLISHED tools only)"},"contentFileId":{"type":"string","description":"File id of the original tool zip (imported from IPFS or publish flow). Present for PUBLISHED tools."},"hash":{"type":"string","description":"Hash (for PUBLISHED tools only)"},"tools":{"type":"array","items":{"type":"object"},"description":"Referenced sub-tools: { name, version?, topicId, messageId }"},"config":{"$ref":"#/components/schemas/ToolConfigResponseDTO"},"version":{"type":"string","nullable":true,"description":"Published tool version (e.g. 1.0.0); null or omitted when not published"}},"required":["id","uuid","name","description","status","creator","owner","topicId","codeVersion","createDate","updateDate","configFileId","tools","config"]},"ToolConfigResponseDTO":{"type":"object","properties":{"id":{"type":"string"},"blockType":{"type":"string","enum":["tool"]},"permissions":{"type":"array","items":{"type":"object"}},"children":{"type":"array","items":{"type":"object"}},"events":{"type":"array","items":{"type":"object"}},"artifacts":{"type":"array","items":{"type":"object"}},"variables":{"type":"array","items":{"type":"object"}},"inputEvents":{"type":"array","items":{"type":"object"}},"outputEvents":{"type":"array","items":{"type":"object"}},"innerEvents":{"type":"array","items":{"type":"object"}},"tag":{"type":"string"}},"required":["id","blockType"]},"ToolValidationDTO":{"type":"object","properties":{"tool":{"$ref":"#/components/schemas/ToolDTO"},"results":{"$ref":"#/components/schemas/ValidationErrorsDTO"}},"required":["tool","results"]},"ValidationErrorsDTO":{"type":"object","properties":{"blocks":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/BlockErrorsDTO"}},"errors":{"nullable":true,"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"infos":{"type":"array","items":{"type":"string"}},"id":{"type":"string","description":"Config block ID (for tool validation)"},"tools":{"type":"array","items":{"type":"object"},"description":"Tool-level errors (for tool validation)"},"isValid":{"type":"boolean","description":"Overall validation result (for tool validation)"}},"required":["blocks","errors","tools","isValid"]},"BlockErrorsDTO":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"infos":{"type":"array","items":{"type":"string"}},"isValid":{"type":"boolean"}},"required":["id","name","errors","isValid"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools/validate":{"post":{"description":"Validates selected tool. Only users with the Standard Registry role are allowed to make the request.","operationId":"ToolsApi_validateTool","parameters":[],"requestBody":{"required":true,"description":"Full tool document (same shape as GET /tools/:id). `customLogicBlock.expression` in examples uses a short placeholder; production tools use longer scripts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolDTO"}}}},"responses":{"200":{"description":"Validation outcome (HTTP 200). `results` is ValidationErrors-style output (blocks, tools, common errors, aggregate isValid). `tool` echoes the submitted tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolValidationDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Validates selected tool.","tags":["tools"]}}}}
```

## Return tool and its artifacts in a zip file format for the specified tool.

> Returns a zip file containing the published tool and all associated artifacts, i.e. schemas and VCs. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools/{id}/export/file":{"get":{"description":"Returns a zip file containing the published tool and all associated artifacts, i.e. schemas and VCs. Only users with the Standard Registry role are allowed to make the request.","operationId":"ToolsApi_toolExportFile","parameters":[{"name":"id","required":true,"in":"path","description":"Tool ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Binary ZIP archive (`Content-Type: application/zip`, `Content-Disposition: attachment`). Not JSON.","content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthorized request.","content":{"application/zip":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/zip":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Invalid id (empty or missing path segment).","content":{"application/zip":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/zip":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Return tool and its artifacts in a zip file format for the specified tool.","tags":["tools"]}}}}
```

## Return tool identity and Hedera message id for export.

> Returns id, uuid, name, description, messageId, owner. \`messageId\` is set when the tool is published to the topic; for DRAFT / dry-run it is null. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ToolExportMessageDTO":{"type":"object","properties":{"id":{"type":"string","description":"Tool ID (internal)"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"messageId":{"type":"string","nullable":true,"description":"Hedera topic message id when published; null for DRAFT / not yet published"},"owner":{"type":"string"}},"required":["id","uuid","name","description","messageId","owner"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools/{id}/export/message":{"get":{"description":"Returns id, uuid, name, description, messageId, owner. `messageId` is set when the tool is published to the topic; for DRAFT / dry-run it is null. Only users with the Standard Registry role are allowed to make the request.","operationId":"ToolsApi_toolExportMessage","parameters":[{"name":"id","required":true,"in":"path","description":"Tool ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Tool export metadata (JSON).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolExportMessageDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Invalid id (empty or missing path segment).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Return tool identity and Hedera message id for export.","tags":["tools"]}}}}
```

## Preview tool package from a Hedera message (IPFS ZIP).

> Loads the tool ZIP from IPFS via \`messageId\`, parses \`tool.json\`, \`schemas/\*\`, \`tags/\*\`, \`tools/\*\`, then adds \`messageId\` and \`toolTopicId\` from the message. Does not persist to the DB. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ImportMessageDTO":{"type":"object","properties":{"messageId":{"type":"string","description":"Hedera topic message id"},"metadata":{"type":"object","additionalProperties":true,"nullable":true}},"required":["messageId","metadata"]},"ToolPreviewDTO":{"type":"object","properties":{"tool":{"description":"Main tool object from `tool.json` in the IPFS archive. Shape is close to ToolDTO but may omit DB-only fields (id, uuid, status, topicId, messageId, etc.).","allOf":[{"$ref":"#/components/schemas/ToolDTO"}]},"schemas":{"additionalProperties":true,"description":"Schema entities parsed from `schemas/*` in the archive (full Schema objects with document, context, …)","type":"array","items":{"type":"object"}},"tags":{"additionalProperties":true,"description":"Tag entities parsed from `tags/*` in the archive","type":"array","items":{"type":"object"}},"tools":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Additional tool JSON files from `tools/*` in the archive (not the same as top-level `tool`)"},"messageId":{"type":"string","description":"Present only for `POST /tools/import/message/preview` — same as request `messageId`. Omitted for file-based preview."},"toolTopicId":{"type":"string","description":"Present only for message-based preview — topic id from the Hedera tool message. Omitted for file-based preview."}},"required":["tool","schemas","tags","tools"]},"ToolDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PUBLISHED","PUBLISH_ERROR"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string","nullable":true,"description":"Message ID (for PUBLISHED tools only; omitted or null for DRAFT)"},"codeVersion":{"type":"string"},"createDate":{"type":"string"},"updateDate":{"type":"string","description":"Last update date"},"configFileId":{"type":"string","description":"Config file ID (internal)"},"tagsTopicId":{"type":"string","description":"Tags topic ID (for PUBLISHED tools only)"},"contentFileId":{"type":"string","description":"File id of the original tool zip (imported from IPFS or publish flow). Present for PUBLISHED tools."},"hash":{"type":"string","description":"Hash (for PUBLISHED tools only)"},"tools":{"type":"array","items":{"type":"object"},"description":"Referenced sub-tools: { name, version?, topicId, messageId }"},"config":{"$ref":"#/components/schemas/ToolConfigResponseDTO"},"version":{"type":"string","nullable":true,"description":"Published tool version (e.g. 1.0.0); null or omitted when not published"}},"required":["id","uuid","name","description","status","creator","owner","topicId","codeVersion","createDate","updateDate","configFileId","tools","config"]},"ToolConfigResponseDTO":{"type":"object","properties":{"id":{"type":"string"},"blockType":{"type":"string","enum":["tool"]},"permissions":{"type":"array","items":{"type":"object"}},"children":{"type":"array","items":{"type":"object"}},"events":{"type":"array","items":{"type":"object"}},"artifacts":{"type":"array","items":{"type":"object"}},"variables":{"type":"array","items":{"type":"object"}},"inputEvents":{"type":"array","items":{"type":"object"}},"outputEvents":{"type":"array","items":{"type":"object"}},"innerEvents":{"type":"array","items":{"type":"object"}},"tag":{"type":"string"}},"required":["id","blockType"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools/import/message/preview":{"post":{"description":"Loads the tool ZIP from IPFS via `messageId`, parses `tool.json`, `schemas/*`, `tags/*`, `tools/*`, then adds `messageId` and `toolTopicId` from the message. Does not persist to the DB. Only users with the Standard Registry role are allowed to make the request.","operationId":"ToolsApi_toolImportMessagePreview","parameters":[],"requestBody":{"required":true,"description":"Hedera topic message id (`messageId`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportMessageDTO"}}}},"responses":{"200":{"description":"Parsed archive components plus message metadata. `schemas` entries are full schema records in production; the example lists all metadata fields with `document` and `context` as empty objects (omitted payload).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolPreviewDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Missing or empty `messageId` in the body (gateway throws before calling guardian), or global request validation failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Preview tool package from a Hedera message (IPFS ZIP).","tags":["tools"]}}}}
```

## Imports new tool from IPFS.

> Imports new tool and all associated artifacts from IPFS into the local DB. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ImportMessageDTO":{"type":"object","properties":{"messageId":{"type":"string","description":"Hedera topic message id"},"metadata":{"type":"object","additionalProperties":true,"nullable":true}},"required":["messageId","metadata"]},"ToolImportResponseDTO":{"type":"object","properties":{"tool":{"description":"Imported tool entity.","allOf":[{"$ref":"#/components/schemas/ToolDTO"}]},"errors":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Import errors. Empty array means the import completed without reported errors."}},"required":["tool","errors"]},"ToolDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PUBLISHED","PUBLISH_ERROR"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string","nullable":true,"description":"Message ID (for PUBLISHED tools only; omitted or null for DRAFT)"},"codeVersion":{"type":"string"},"createDate":{"type":"string"},"updateDate":{"type":"string","description":"Last update date"},"configFileId":{"type":"string","description":"Config file ID (internal)"},"tagsTopicId":{"type":"string","description":"Tags topic ID (for PUBLISHED tools only)"},"contentFileId":{"type":"string","description":"File id of the original tool zip (imported from IPFS or publish flow). Present for PUBLISHED tools."},"hash":{"type":"string","description":"Hash (for PUBLISHED tools only)"},"tools":{"type":"array","items":{"type":"object"},"description":"Referenced sub-tools: { name, version?, topicId, messageId }"},"config":{"$ref":"#/components/schemas/ToolConfigResponseDTO"},"version":{"type":"string","nullable":true,"description":"Published tool version (e.g. 1.0.0); null or omitted when not published"}},"required":["id","uuid","name","description","status","creator","owner","topicId","codeVersion","createDate","updateDate","configFileId","tools","config"]},"ToolConfigResponseDTO":{"type":"object","properties":{"id":{"type":"string"},"blockType":{"type":"string","enum":["tool"]},"permissions":{"type":"array","items":{"type":"object"}},"children":{"type":"array","items":{"type":"object"}},"events":{"type":"array","items":{"type":"object"}},"artifacts":{"type":"array","items":{"type":"object"}},"variables":{"type":"array","items":{"type":"object"}},"inputEvents":{"type":"array","items":{"type":"object"}},"outputEvents":{"type":"array","items":{"type":"object"}},"innerEvents":{"type":"array","items":{"type":"object"}},"tag":{"type":"string"}},"required":["id","blockType"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools/import/message":{"post":{"description":"Imports new tool and all associated artifacts from IPFS into the local DB. Only users with the Standard Registry role are allowed to make the request.","operationId":"ToolsApi_toolImportMessage","parameters":[],"requestBody":{"required":true,"description":"Message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportMessageDTO"}}}},"responses":{"201":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolImportResponseDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Imports new tool from IPFS.","tags":["tools"]}}}}
```

## Preview tool package from an uploaded \*.tool file.

> Parses the uploaded tool archive (\`\*.tool\`, ZIP format; \`tool.json\`, \`schemas/\*\`, \`tags/\*\`, \`tools/\*\`) without persisting. Shape matches message preview; \`messageId\` / \`toolTopicId\` may be absent when not sourced from a Hedera message. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ToolPreviewDTO":{"type":"object","properties":{"tool":{"description":"Main tool object from `tool.json` in the IPFS archive. Shape is close to ToolDTO but may omit DB-only fields (id, uuid, status, topicId, messageId, etc.).","allOf":[{"$ref":"#/components/schemas/ToolDTO"}]},"schemas":{"additionalProperties":true,"description":"Schema entities parsed from `schemas/*` in the archive (full Schema objects with document, context, …)","type":"array","items":{"type":"object"}},"tags":{"additionalProperties":true,"description":"Tag entities parsed from `tags/*` in the archive","type":"array","items":{"type":"object"}},"tools":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Additional tool JSON files from `tools/*` in the archive (not the same as top-level `tool`)"},"messageId":{"type":"string","description":"Present only for `POST /tools/import/message/preview` — same as request `messageId`. Omitted for file-based preview."},"toolTopicId":{"type":"string","description":"Present only for message-based preview — topic id from the Hedera tool message. Omitted for file-based preview."}},"required":["tool","schemas","tags","tools"]},"ToolDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PUBLISHED","PUBLISH_ERROR"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string","nullable":true,"description":"Message ID (for PUBLISHED tools only; omitted or null for DRAFT)"},"codeVersion":{"type":"string"},"createDate":{"type":"string"},"updateDate":{"type":"string","description":"Last update date"},"configFileId":{"type":"string","description":"Config file ID (internal)"},"tagsTopicId":{"type":"string","description":"Tags topic ID (for PUBLISHED tools only)"},"contentFileId":{"type":"string","description":"File id of the original tool zip (imported from IPFS or publish flow). Present for PUBLISHED tools."},"hash":{"type":"string","description":"Hash (for PUBLISHED tools only)"},"tools":{"type":"array","items":{"type":"object"},"description":"Referenced sub-tools: { name, version?, topicId, messageId }"},"config":{"$ref":"#/components/schemas/ToolConfigResponseDTO"},"version":{"type":"string","nullable":true,"description":"Published tool version (e.g. 1.0.0); null or omitted when not published"}},"required":["id","uuid","name","description","status","creator","owner","topicId","codeVersion","createDate","updateDate","configFileId","tools","config"]},"ToolConfigResponseDTO":{"type":"object","properties":{"id":{"type":"string"},"blockType":{"type":"string","enum":["tool"]},"permissions":{"type":"array","items":{"type":"object"}},"children":{"type":"array","items":{"type":"object"}},"events":{"type":"array","items":{"type":"object"}},"artifacts":{"type":"array","items":{"type":"object"}},"variables":{"type":"array","items":{"type":"object"}},"inputEvents":{"type":"array","items":{"type":"object"}},"outputEvents":{"type":"array","items":{"type":"object"}},"innerEvents":{"type":"array","items":{"type":"object"}},"tag":{"type":"string"}},"required":["id","blockType"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools/import/file/preview":{"post":{"description":"Parses the uploaded tool archive (`*.tool`, ZIP format; `tool.json`, `schemas/*`, `tags/*`, `tools/*`) without persisting. Shape matches message preview; `messageId` / `toolTopicId` may be absent when not sourced from a Hedera message. Only users with the Standard Registry role are allowed to make the request.","operationId":"ToolsApi_toolImportFilePreview","parameters":[],"requestBody":{"required":true,"description":"Tool archive (`*.tool`, ZIP format) as raw binary request body.","content":{"binary/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Parsed archive components. Same structure as `POST /tools/import/message/preview`; the example matches that response shape (`document` / `context` empty in `schemas`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolPreviewDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Preview tool package from an uploaded *.tool file.","tags":["tools"]}}}}
```

## Imports new tool from a \*.tool file.

> Imports new tool and all associated artifacts, such as schemas and VCs, from the provided \`\*.tool\` file (ZIP format) into the local DB. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ToolDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PUBLISHED","PUBLISH_ERROR"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string","nullable":true,"description":"Message ID (for PUBLISHED tools only; omitted or null for DRAFT)"},"codeVersion":{"type":"string"},"createDate":{"type":"string"},"updateDate":{"type":"string","description":"Last update date"},"configFileId":{"type":"string","description":"Config file ID (internal)"},"tagsTopicId":{"type":"string","description":"Tags topic ID (for PUBLISHED tools only)"},"contentFileId":{"type":"string","description":"File id of the original tool zip (imported from IPFS or publish flow). Present for PUBLISHED tools."},"hash":{"type":"string","description":"Hash (for PUBLISHED tools only)"},"tools":{"type":"array","items":{"type":"object"},"description":"Referenced sub-tools: { name, version?, topicId, messageId }"},"config":{"$ref":"#/components/schemas/ToolConfigResponseDTO"},"version":{"type":"string","nullable":true,"description":"Published tool version (e.g. 1.0.0); null or omitted when not published"}},"required":["id","uuid","name","description","status","creator","owner","topicId","codeVersion","createDate","updateDate","configFileId","tools","config"]},"ToolConfigResponseDTO":{"type":"object","properties":{"id":{"type":"string"},"blockType":{"type":"string","enum":["tool"]},"permissions":{"type":"array","items":{"type":"object"}},"children":{"type":"array","items":{"type":"object"}},"events":{"type":"array","items":{"type":"object"}},"artifacts":{"type":"array","items":{"type":"object"}},"variables":{"type":"array","items":{"type":"object"}},"inputEvents":{"type":"array","items":{"type":"object"}},"outputEvents":{"type":"array","items":{"type":"object"}},"innerEvents":{"type":"array","items":{"type":"object"}},"tag":{"type":"string"}},"required":["id","blockType"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools/import/file":{"post":{"description":"Imports new tool and all associated artifacts, such as schemas and VCs, from the provided `*.tool` file (ZIP format) into the local DB. Only users with the Standard Registry role are allowed to make the request.","operationId":"ToolsApi_toolImportFile","parameters":[],"requestBody":{"required":true,"description":"Tool archive (`*.tool`, ZIP format) as raw binary request body.","content":{"binary/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Imports new tool from a *.tool file.","tags":["tools"]}}}}
```

## Imports new tool from a \*.tool file.

> Imports new tool and all associated artifacts, such as schemas and VCs, from the provided \`\*.tool\` file (ZIP format) into the local DB. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ToolDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PUBLISHED","PUBLISH_ERROR"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string","nullable":true,"description":"Message ID (for PUBLISHED tools only; omitted or null for DRAFT)"},"codeVersion":{"type":"string"},"createDate":{"type":"string"},"updateDate":{"type":"string","description":"Last update date"},"configFileId":{"type":"string","description":"Config file ID (internal)"},"tagsTopicId":{"type":"string","description":"Tags topic ID (for PUBLISHED tools only)"},"contentFileId":{"type":"string","description":"File id of the original tool zip (imported from IPFS or publish flow). Present for PUBLISHED tools."},"hash":{"type":"string","description":"Hash (for PUBLISHED tools only)"},"tools":{"type":"array","items":{"type":"object"},"description":"Referenced sub-tools: { name, version?, topicId, messageId }"},"config":{"$ref":"#/components/schemas/ToolConfigResponseDTO"},"version":{"type":"string","nullable":true,"description":"Published tool version (e.g. 1.0.0); null or omitted when not published"}},"required":["id","uuid","name","description","status","creator","owner","topicId","codeVersion","createDate","updateDate","configFileId","tools","config"]},"ToolConfigResponseDTO":{"type":"object","properties":{"id":{"type":"string"},"blockType":{"type":"string","enum":["tool"]},"permissions":{"type":"array","items":{"type":"object"}},"children":{"type":"array","items":{"type":"object"}},"events":{"type":"array","items":{"type":"object"}},"artifacts":{"type":"array","items":{"type":"object"}},"variables":{"type":"array","items":{"type":"object"}},"inputEvents":{"type":"array","items":{"type":"object"}},"outputEvents":{"type":"array","items":{"type":"object"}},"innerEvents":{"type":"array","items":{"type":"object"}},"tag":{"type":"string"}},"required":["id","blockType"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools/import/file-metadata":{"post":{"description":"Imports new tool and all associated artifacts, such as schemas and VCs, from the provided `*.tool` file (ZIP format) into the local DB. Only users with the Standard Registry role are allowed to make the request.","operationId":"ToolsApi_toolImportFileWithMetadata","parameters":[],"requestBody":{"required":true,"description":"Multipart form data with a tool archive (`*.tool`, ZIP format) and optional metadata JSON file.","content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"Tool archive (`*.tool`, ZIP format)."},"metadata":{"type":"string","format":"binary","nullable":true,"description":"Optional JSON file (for example `metadata.json`) with content like `{ \"tools\": { \"1706867530.884259218\": \"1774367941.594676930\" } }`."}}}}}},"responses":{"201":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Imports new tool from a *.tool file.","tags":["tools"]}}}}
```

## Imports new tool from a \*.tool file.

> Imports new tool and all associated artifacts, such as schemas and VCs, from the provided \`\*.tool\` file (ZIP format) into the local DB. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools/push/import/file":{"post":{"description":"Imports new tool and all associated artifacts, such as schemas and VCs, from the provided `*.tool` file (ZIP format) into the local DB. Only users with the Standard Registry role are allowed to make the request.","operationId":"ToolsApi_toolImportFileAsync","parameters":[],"requestBody":{"required":true,"description":"Tool archive (`*.tool`, ZIP format) as raw binary request body.","content":{"binary/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"202":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"object","required":["taskId","expectation","action","userId"],"properties":{"taskId":{"type":"string","description":"Task Id"},"expectation":{"type":"number","description":"Expected count of task phases"},"action":{"type":"string","description":"Task action"},"userId":{"type":"string","description":"User Id"}}}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Imports new tool from a *.tool file.","tags":["tools"]}}}}
```

## Imports new tool from a \*.tool file.

> Imports new tool and all associated artifacts, such as schemas and VCs, from the provided \`\*.tool\` file (ZIP format) into the local DB. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools/push/import/file-metadata":{"post":{"description":"Imports new tool and all associated artifacts, such as schemas and VCs, from the provided `*.tool` file (ZIP format) into the local DB. Only users with the Standard Registry role are allowed to make the request.","operationId":"ToolsApi_toolImportFileWithMetadataAsync","parameters":[],"requestBody":{"required":true,"description":"Multipart form data with a tool archive (`*.tool`, ZIP format) and optional metadata JSON file.","content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"Tool archive (`*.tool`, ZIP format)."},"metadata":{"type":"string","format":"binary","nullable":true,"description":"Optional JSON file (for example `metadata.json`) with content like `{ \"tools\": { \"1706867530.884259218\": \"1774367941.594676930\" } }`."}}}}}},"responses":{"202":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"object","required":["taskId","expectation","action","userId"],"properties":{"taskId":{"type":"string","description":"Task Id"},"expectation":{"type":"number","description":"Expected count of task phases"},"action":{"type":"string","description":"Task action"},"userId":{"type":"string","description":"User Id"}}}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Imports new tool from a *.tool file.","tags":["tools"]}}}}
```

## Imports new tool from IPFS.

> Imports new tool and all associated artifacts from IPFS into the local DB. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ImportMessageDTO":{"type":"object","properties":{"messageId":{"type":"string","description":"Hedera topic message id"},"metadata":{"type":"object","additionalProperties":true,"nullable":true}},"required":["messageId","metadata"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools/push/import/message":{"post":{"description":"Imports new tool and all associated artifacts from IPFS into the local DB. Only users with the Standard Registry role are allowed to make the request.","operationId":"ToolsApi_toolImportMessageAsync","parameters":[],"requestBody":{"required":true,"description":"Message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportMessageDTO"}}}},"responses":{"202":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"object","required":["taskId","expectation","action","userId"],"properties":{"taskId":{"type":"string","description":"Task Id"},"expectation":{"type":"number","description":"Expected count of task phases"},"action":{"type":"string","description":"Task action"},"userId":{"type":"string","description":"User Id"}}}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Imports new tool from IPFS.","tags":["tools"]}}}}
```

## Return a list of tools.

> Returns tools menu. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ToolMenuItemDTO":{"type":"object","properties":{"id":{"type":"string"},"hash":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string"},"tools":{"description":"Referenced sub-tools from the tool config.","type":"array","items":{"$ref":"#/components/schemas/ToolMenuSubToolDTO"}},"config":{"description":"Reduced tool config returned by the menu endpoint.","allOf":[{"$ref":"#/components/schemas/ToolMenuConfigDTO"}]},"schemas":{"description":"Schemas linked to the tool topic.","type":"array","items":{"$ref":"#/components/schemas/ToolMenuSchemaDTO"}}},"required":["id","hash","name","description","owner","topicId","messageId","tools","config","schemas"]},"ToolMenuSubToolDTO":{"type":"object","properties":{"name":{"type":"string","description":"Referenced sub-tool name."},"version":{"type":"string","nullable":true,"description":"Referenced sub-tool version when available."},"topicId":{"type":"string","description":"Referenced sub-tool topic id."},"messageId":{"type":"string","description":"Referenced sub-tool message id."}}},"ToolMenuConfigDTO":{"type":"object","properties":{"inputEvents":{"description":"Tool input events exposed in the menu.","type":"array","items":{"$ref":"#/components/schemas/ToolMenuConfigItemDTO"}},"outputEvents":{"description":"Tool output events exposed in the menu.","type":"array","items":{"$ref":"#/components/schemas/ToolMenuConfigItemDTO"}},"variables":{"description":"Tool variables exposed in the menu.","type":"array","items":{"$ref":"#/components/schemas/ToolMenuVariableDTO"}}}},"ToolMenuConfigItemDTO":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"required":["name","description"]},"ToolMenuVariableDTO":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"}},"required":["name","description","type"]},"ToolMenuSchemaDTO":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"topicId":{"type":"string"},"iri":{"type":"string"},"category":{"type":"string","description":"Schema category when present in the source response."}},"required":["id","name","description","topicId","iri"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools/menu/all":{"get":{"description":"Returns tools menu. Only users with the Standard Registry role are allowed to make the request.","operationId":"ToolsApi_getMenu","parameters":[],"responses":{"200":{"description":"Tools menu.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ToolMenuItemDTO"}}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Return a list of tools.","tags":["tools"]}}}}
```

## Checks the availability of the tool.

> Checks the availability of the tool. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"tools"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/tools/check/{messageId}":{"get":{"description":"Checks the availability of the tool. Only users with the Standard Registry role are allowed to make the request.","operationId":"ToolsApi_checkTool","parameters":[{"name":"messageId","required":true,"in":"path","description":"Tool message ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Availability of the tool.","content":{"application/json":{"schema":{"type":"boolean"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Checks the availability of the tool.","tags":["tools"]}}}}
```
