Skip to main content
Glama
carlosazaustre

Activity Reporting MCP Server

submit_story

Submit a story activity draft to the Activity Reporting MCP Server, including title, description, date, significance, metrics, and optional tags or links for reporting developer activities.

Instructions

Submit a story activity draft

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activityDateYesActivity Date (YYYY-MM-DD format)
activityUrlYesLink
additionalInfoNoAdditional information (optional)
descriptionYesDescription
metricsYes
privateNoDo you want to make this activity private? (optional)
significanceTypeYesSignificance type
tagsNoTags (optional)
titleYesTitle of the story
whyIsSignificantYesWhy is it significant

Implementation Reference

  • Core handler function that executes the tool logic by sending a POST request to the GDE API endpoint '/activity-drafts/stories' with the provided StoryDraft data.
    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:491-566 (registration)
    Registration of the 'submit_story' tool in the listTools response, including detailed input schema for validation.
    {
      name: "submit_story",
      description: "Submit a story activity draft",
      inputSchema: {
        type: "object",
        properties: {
          title: {
            type: "string",
            description: "Title of the story",
            minLength: 3,
            maxLength: 200,
          },
          description: {
            type: "string",
            description: "Description",
            maxLength: 2000,
          },
          activityDate: {
            type: "string",
            pattern: "^\\d{4}-\\d{2}-\\d{2}$",
            description: "Activity Date (YYYY-MM-DD format)",
          },
          whyIsSignificant: {
            type: "string",
            maxLength: 2000,
            description: "Why is it significant",
          },
          significanceType: {
            type: "string",
            enum: Object.values(SignificanceType),
            description: "Significance type",
          },
          activityUrl: {
            type: "string",
            maxLength: 500,
            pattern: "^https?://.*",
            description: "Link",
          },
          tags: {
            type: "array",
            items: { type: "string" },
            description: "Tags (optional)",
            minItems: 0,
          },
          metrics: {
            type: "object",
            properties: {
              impact: {
                type: "integer",
                minimum: 1,
                description: "Impact (views, reads, attendees, etc.)",
              },
            },
            required: ["impact"],
          },
          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",
          "whyIsSignificant",
          "significanceType",
          "activityUrl",
          "metrics",
        ],
      },
    },
  • Switch case that handles 'submit_story' tool calls by invoking the shared submitActivityDraft with the 'stories' endpoint.
    case "submit_story":
      return await this.submitActivityDraft("stories", args as unknown as StoryDraft);
  • TypeScript interface defining the structure of StoryDraft, used for type-checking the tool input arguments.
    export interface StoryDraft extends ActivityDraftBase {
      /** Explanation of why this story is significant */
      whyIsSignificant: string;
      /** Type of significance or impact category */
      significanceType: SignificanceType;
      /** URL link to the story or related content */
      activityUrl: string;
      /** Metrics related to impact */
      metrics: {
        /** Impact measurement (views, reads, attendees, etc.) */
        impact: number;
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states 'Submit a story activity draft,' implying a write operation, but doesn't cover permissions, side effects, response format, or error handling. This is inadequate for a tool with 10 parameters and no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's appropriately sized and front-loaded, though it could benefit from more detail given the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 10 parameters, nested objects, no annotations, and no output schema, the description is insufficient. It doesn't explain what constitutes a 'story activity,' how submissions are processed, or what happens after submission, leaving significant gaps in understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is high (90%), so the schema documents most parameters well. The description adds no additional parameter context beyond implying this is for 'story activity' drafts, which doesn't clarify individual parameters. Baseline 3 is appropriate given the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Submit') and resource ('a story activity draft'), making the purpose understandable. However, it doesn't differentiate this tool from its siblings (like submit_content_creation or submit_public_speaking), which appear to be similar submission tools for different activity types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus its siblings. The description doesn't mention alternatives, prerequisites, or exclusions, leaving the agent to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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