Skip to main content
Glama

Get Free API Key

get_stresszero_api_key

Generate a free API key for StressZero's stress management tools, enabling access to AI-powered mental wellness resources with 500 monthly calls.

Instructions

Create a free StressZero API key (500 calls/month). Use this to help users get started with the API. The key is returned once and cannot be retrieved later. Requires a valid email address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYesUser's email address for the API key
project_nameNoName of the project using the API keyMCP Integration

Implementation Reference

  • The handler function for the get_stresszero_api_key tool, which performs an API request to create the key and returns the result.
    async ({ email, project_name }) => {
      const result = await apiRequest("/api/v1/keys", {
        method: "POST",
        body: JSON.stringify({
          email,
          name: project_name ?? "MCP Integration",
        }),
      });
    
      if (!result.success) {
        const errMsg = result.error?.message || "Unknown error";
        const hint = result.error?.status === 409
          ? "\nAn active API key already exists for this email."
          : "";
    
        return {
          isError: true,
          content: [
            {
              type: "text" as const,
              text: `API key creation failed: ${errMsg}${hint}`,
            },
          ],
        };
      }
    
      const data = result.data as Record<string, unknown>;
    
      return {
        content: [
          {
            type: "text" as const,
            text: [
              "API Key created successfully!",
              "",
              `Key: ${data?.api_key ?? "N/A"}`,
              `Tier: Free (500 calls/month)`,
              "",
              "IMPORTANT: Save this key now — it will NOT be shown again.",
              "",
              `Documentation: ${data?.docs_url ?? "https://stresszeroentrepreneur.fr/intelligence-api"}`,
            ].join("\n"),
  • The input schema definition for the get_stresszero_api_key tool, validating the email and project_name inputs.
    inputSchema: {
      email: z.string().email().describe("User's email address for the API key"),
      project_name: z.string().min(1).max(100).default("MCP Integration").optional().describe(
        "Name of the project using the API key",
      ),
    },
  • src/index.ts:401-421 (registration)
    Registration of the get_stresszero_api_key tool using the server.registerTool method.
    server.registerTool(
      "get_stresszero_api_key",
      {
        title: "Get Free API Key",
        description:
          "Create a free StressZero API key (500 calls/month). " +
          "Use this to help users get started with the API. " +
          "The key is returned once and cannot be retrieved later. " +
          "Requires a valid email address.",
        inputSchema: {
          email: z.string().email().describe("User's email address for the API key"),
          project_name: z.string().min(1).max(100).default("MCP Integration").optional().describe(
            "Name of the project using the API key",
          ),
        },
        annotations: {
          readOnlyHint: false,
          destructiveHint: false,
          idempotentHint: false,
        },
      },
Behavior4/5

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

Adds critical context beyond annotations: rate limit '500 calls/month,' irrevocability 'key is returned once and cannot be retrieved later,' and prerequisite 'Requires a valid email address.' Aligns with idempotentHint=false (creates new resource each time) and destructiveHint=false.

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?

Four sentences with zero waste: (1) purpose+constraints, (2) usage context, (3) critical behavioral warning, (4) prerequisites. Well front-loaded and appropriately sized for a 2-parameter mutation tool.

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

Completeness4/5

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

Lacks output schema but description compensates by stating the key is 'returned once.' Covers rate limiting, retrieval constraints, and authentication requirements. Missing only minor details like error cases for duplicate emails.

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

Parameters4/5

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

Schema has 100% coverage so baseline is 3. Description adds validation emphasis ('valid email address') and implicitly contextualizes project_name via 'help users get started.' Elevates slightly above baseline by highlighting the required nature of email beyond just schema constraints.

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

Purpose5/5

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

Specific verb 'Create' + resource 'StressZero API key' with clear scope (500 calls/month). Distinguishes from burnout analysis siblings (analyze_burnout, etc.) by focusing on API provisioning vs. burnout assessment.

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

Usage Guidelines4/5

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

Explicitly states when to use: 'help users get started with the API.' Lacks explicit 'when not to use' or named alternatives, though differentiation from siblings is obvious from the domain shift (API keys vs burnout analysis).

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

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/gomessoaresemmanuel-cpu/stresszero-mcp'

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