diff options
Diffstat (limited to 'src/mcp/tools/common/common.h')
| -rw-r--r-- | src/mcp/tools/common/common.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mcp/tools/common/common.h b/src/mcp/tools/common/common.h index 741b2ce..0dedca8 100644 --- a/src/mcp/tools/common/common.h +++ b/src/mcp/tools/common/common.h @@ -10,8 +10,17 @@ void tiny_mcp_tool_add_error(mcpc_ucbr_t *result, const char *code, const char * void tiny_mcp_tool_add_json(mcpc_ucbr_t *result, tiny_json_buffer_t *json); char *tiny_mcp_tool_get_string(const mcpc_tool_t *tool, const char *name, size_t maximum); void tiny_mcp_tool_append_message(tiny_json_buffer_t *json, const tiny_message_t *message); -bool -tiny_mcp_parse_metadata(const char *json, tiny_message_t *message, tiny_metadata_mask_t *present); +typedef enum tiny_metadata_parse_status +{ + TINY_METADATA_PARSE_OK = 0, + TINY_METADATA_PARSE_INVALID, + TINY_METADATA_PARSE_NO_MEMORY +} tiny_metadata_parse_status_t; + +tiny_metadata_parse_status_t tiny_mcp_parse_metadata(const char *json, + tiny_message_t *message, + tiny_metadata_mask_t *present, + const char **error); mcpc_tool_t *tiny_mcp_tool_new(const char *name, const char *description, mcpc_tcallcb_t callback); bool tiny_mcp_tool_add_property(mcpc_tool_t *tool, |
