Skip to main content
Glama

ask_assistant

Query an assistant on Folderr's MCP server by providing an assistant ID and a question to receive relevant responses for API interactions.

Instructions

Ask a question to a specific assistant

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assistant_idYesID of the assistant to ask
questionYesQuestion to ask the assistant

Implementation Reference

  • The handler function that executes the 'ask_assistant' tool: validates login, sends POST request to the assistant API with the question, and returns the response as JSON or an error message.
    private async handleAskAssistant(args: any) { if (!this.config.token) { throw new McpError(ErrorCode.InvalidRequest, 'Not logged in'); } try { const response = await this.axiosInstance.post( `/api/agent/${args.assistant_id}/message`, { message: args.question } ); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error: any) { return { content: [ { type: 'text', text: `Failed to ask assistant: ${error.response?.data?.message || error.message}`, }, ], isError: true, }; } }
  • Input schema for the 'ask_assistant' tool, requiring 'assistant_id' and 'question' as strings.
    inputSchema: { type: 'object', properties: { assistant_id: { type: 'string', description: 'ID of the assistant to ask', }, question: { type: 'string', description: 'Question to ask the assistant', }, }, required: ['assistant_id', 'question'], },
  • src/index.ts:152-169 (registration)
    Registration of the 'ask_assistant' tool in the tools array passed to setTools, including name, description, and input schema.
    { name: 'ask_assistant', description: 'Ask a question to a specific assistant', inputSchema: { type: 'object', properties: { assistant_id: { type: 'string', description: 'ID of the assistant to ask', }, question: { type: 'string', description: 'Question to ask the assistant', }, }, required: ['assistant_id', 'question'], }, },
  • src/index.ts:223-224 (registration)
    Dispatch case in the central request handler that routes 'ask_assistant' calls to the specific handleAskAssistant function.
    case 'ask_assistant': return await this.handleAskAssistant(request.params.arguments);

Other Tools

Related Tools

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/folderr-tech/folderr-mcp-server'

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