Skip to main content

Module utils

Module utils 

Source
Expand description

Memory management utilities for plugins

This module provides safe wrappers around the unsafe FFI memory management operations required by the plugin API.

Functions§

html_content
Helper to create an HTML content response
image_contentDeprecated
Helper to create an image content response (legacy)
image_data_content
Helper to create an image content response with base64 data
image_url_content
Helper to create an image content response with URL
json_content
Helper to create a JSON content response
markdown_content
Helper to create a Markdown content response
multi_content
Helper to create a multi-content response
prepare_result
Prepare a result for return to the framework
resource_content
Helper to create a resource content response
resource_list_response
Build MCP resources/list response JSON
resource_read_response
Build MCP resources/read response JSON
return_error
Return an error result to the framework
return_success
Return a success result to the framework
standard_free_string
Standard free_string implementation
text_content
Helper to create a text content response