Skip to main content
Glama

get_ai_action_responses

Filter and retrieve AI-generated responses by prompt, message, or conversation ID in Carbon Voice. Narrow results with combined filters to view all responses tied to specific interactions.

Instructions

Retrieve previously generated AI Action (Prompt) responses by filtering for a specific prompt, message, or conversation ID. Combine filters to narrow results and view all AI-generated responses related to a particular prompt, message, or conversation.

Input Schema

NameRequiredDescriptionDefault
channel_idNo
dateNo
directionNo
limitNo
message_idNo
prompt_idNo

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "channel_id": { "type": "string" }, "date": { "format": "date-time", "type": "string" }, "direction": { "enum": [ "older", "newer" ], "type": "string" }, "limit": { "default": 50, "type": "number" }, "message_id": { "type": "string" }, "prompt_id": { "type": "string" } }, "type": "object" }

Implementation Reference

  • The core handler function for the 'get_ai_action_responses' MCP tool. It takes input parameters, authenticates via authInfo, calls the generated simplifiedApi to fetch AI responses, formats the result as McpToolResponse, and handles errors.
    async ( args: AIResponseControllerGetAllResponsesParams, { authInfo }, ): Promise<McpToolResponse> => { try { return formatToMCPToolResponse( await simplifiedApi.aIResponseControllerGetAllResponses( args, setCarbonVoiceAuthHeader(authInfo?.token), ), ); } catch (error) { logger.error('Error getting ai action responses:', { error }); return formatToMCPToolResponse(error); } },
  • src/server.ts:917-945 (registration)
    Registration of the 'get_ai_action_responses' tool using server.registerTool, including tool name, description, input schema (Zod validation), annotations, and the handler function.
    server.registerTool( 'get_ai_action_responses', { description: 'Retrieve previously generated AI Action (Prompt) responses by filtering for a specific prompt, message, or conversation ID. ' + 'Combine filters to narrow results and view all AI-generated responses related to a particular prompt, message, or conversation.', inputSchema: aIResponseControllerGetAllResponsesQueryParams.shape, annotations: { readOnlyHint: true, destructiveHint: false, }, }, async ( args: AIResponseControllerGetAllResponsesParams, { authInfo }, ): Promise<McpToolResponse> => { try { return formatToMCPToolResponse( await simplifiedApi.aIResponseControllerGetAllResponses( args, setCarbonVoiceAuthHeader(authInfo?.token), ), ); } catch (error) { logger.error('Error getting ai action responses:', { error }); return formatToMCPToolResponse(error); } }, );
  • Zod schema definition for the input query parameters of the get_ai_action_responses tool, used for validation in the tool registration. Defines optional filters like message_id, prompt_id, channel_id, with limit, direction, and date.
    export const aIResponseControllerGetAllResponsesQueryLimitDefault = 50; export const aIResponseControllerGetAllResponsesQueryParams = zod.object({ "message_id": zod.string().optional(), "prompt_id": zod.string().optional(), "channel_id": zod.string().optional(), "limit": zod.number().default(aIResponseControllerGetAllResponsesQueryLimitDefault), "direction": zod.enum(['older', 'newer']).optional(), "date": zod.string().datetime({}).optional() })

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PhononX/cv-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server