Skip to main content
Glama

submit_public_speaking

Submit a public speaking activity draft to the Activity Reporting MCP Server, including details like title, description, date, event format, attendees, and relevant URLs for accurate reporting and tracking.

Instructions

Submit a public speaking activity draft

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activityDateYesDate of your talk (YYYY-MM-DD format)
activityUrlYesEvent link or relevant URL
additionalInfoNoAdditional information (optional)
countryNoCountry (required if eventFormat is In-Person or Hybrid)
descriptionYesWhat was it about?
eventFormatYesSelect event format
inPersonAttendeesNoIn-person attendees (required if eventFormat is Hybrid or In-Person)
metricsYes
privateNoDo you want to make this activity private? (optional)
tagsNoTags (optional)
titleYesWhat was the title of your talk?

Implementation Reference

  • The core handler function that executes the tool logic by sending a POST request to the Advocu API endpoint '/activity-drafts/public-speaking' with the provided draft data. Handles authentication, errors, and formats responses for MCP.
    private async submitActivityDraft( endpoint: string, data: | ContentCreationDraft | PublicSpeakingDraft | WorkshopDraft | MentoringDraft | ProductFeedbackDraft | GooglerInteractionDraft | StoryDraft, ): Promise<{ content: Array<{ type: string; text: string; }>; }> { const url = `${this.baseUrl}/activity-drafts/${endpoint}`; try { const response = await fetch(url, { method: "POST", headers: { "Content-Type": "application/json", Authorization: `Bearer ${this.accessToken}`, }, body: JSON.stringify(data), }); if (!response.ok) { const errorText = await response.text(); let errorMessage = `GDE API error (${response.status})`; if (response.status === 401) { errorMessage = "❌ GDE authentication failed. Your ADVOCU_ACCESS_TOKEN may be expired or invalid.\n\nPlease check your Advocu access token configuration."; } else if (response.status === 400) { errorMessage = `❌ GDE API rejected the request:\n\n${errorText}\n\nPlease check:\n- All required fields are present\n- Field values match expected formats\n- Tags are valid\n- Date format is correct (YYYY-MM-DD)`; } else if (response.status === 429) { errorMessage = "⏱️ GDE API rate limit exceeded (30 requests/minute). Please wait and try again."; } else { errorMessage = `❌ GDE API error (${response.status}):\n\n${errorText}`; } // Return error as content instead of throwing return { content: [ { type: "text", text: errorMessage, }, ], }; } const result = (await response.json()) as Record<string, unknown>; return { content: [ { type: "text", text: `✅ GDE Activity draft submitted successfully!\n\nEndpoint: ${endpoint}\nStatus: ${response.status}\nResponse: ${JSON.stringify(result, null, 2)}`, }, ], }; } catch (error) { if (error instanceof McpError) { throw error; } const errorMsg = this.getErrorMessage(error); throw new McpError( ErrorCode.InternalError, `❌ Failed to submit GDE activity:\n\n${errorMsg}\n\nEndpoint: ${endpoint}` ); } }
  • src/server.ts:143-215 (registration)
    Registers the 'submit_public_speaking' tool in the MCP server's listTools handler, including its name, description, and complete input schema.
    { name: "submit_public_speaking", description: "Submit a public speaking activity draft", inputSchema: { type: "object", properties: { title: { type: "string", description: "What was the title of your talk?", minLength: 3, maxLength: 200, }, description: { type: "string", description: "What was it about?", maxLength: 2000, }, activityDate: { type: "string", pattern: "^\\d{4}-\\d{2}-\\d{2}$", description: "Date of your talk (YYYY-MM-DD format)", }, tags: { type: "array", items: { type: "string" }, description: "Tags (optional)", minItems: 0, }, metrics: { type: "object", properties: { attendees: { type: "integer", minimum: 1, description: "How many people attended your session in total?", }, }, required: ["attendees"], }, eventFormat: { type: "string", enum: Object.values(EventFormat), description: "Select event format", }, country: { type: "string", enum: Object.values(Country), description: "Country (required if eventFormat is In-Person or Hybrid)", }, inPersonAttendees: { type: "integer", minimum: 0, description: "In-person attendees (required if eventFormat is Hybrid or In-Person)", }, activityUrl: { type: "string", maxLength: 500, pattern: "^https?://.*", description: "Event link or relevant URL", }, additionalInfo: { type: "string", maxLength: 2000, description: "Additional information (optional)", }, private: { type: "boolean", description: "Do you want to make this activity private? (optional)", }, }, required: ["title", "description", "activityDate", "metrics", "eventFormat", "activityUrl"], }, },
  • Specific dispatch case in the CallToolRequestSchema handler that maps the tool call to the shared submitActivityDraft function with the appropriate endpoint and type casting.
    case "submit_public_speaking": return await this.submitActivityDraft("public-speaking", args as unknown as PublicSpeakingDraft);
  • Detailed input schema for the submit_public_speaking tool, defining validation rules for all parameters including required fields, types, enums, patterns, and constraints.
    inputSchema: { type: "object", properties: { title: { type: "string", description: "What was the title of your talk?", minLength: 3, maxLength: 200, }, description: { type: "string", description: "What was it about?", maxLength: 2000, }, activityDate: { type: "string", pattern: "^\\d{4}-\\d{2}-\\d{2}$", description: "Date of your talk (YYYY-MM-DD format)", }, tags: { type: "array", items: { type: "string" }, description: "Tags (optional)", minItems: 0, }, metrics: { type: "object", properties: { attendees: { type: "integer", minimum: 1, description: "How many people attended your session in total?", }, }, required: ["attendees"], }, eventFormat: { type: "string", enum: Object.values(EventFormat), description: "Select event format", }, country: { type: "string", enum: Object.values(Country), description: "Country (required if eventFormat is In-Person or Hybrid)", }, inPersonAttendees: { type: "integer", minimum: 0, description: "In-person attendees (required if eventFormat is Hybrid or In-Person)", }, activityUrl: { type: "string", maxLength: 500, pattern: "^https?://.*", description: "Event link or relevant URL", }, additionalInfo: { type: "string", maxLength: 2000, description: "Additional information (optional)", }, private: { type: "boolean", description: "Do you want to make this activity private? (optional)", }, }, required: ["title", "description", "activityDate", "metrics", "eventFormat", "activityUrl"], },

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/carlosazaustre/advocu-mcp-server'

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