Skip to main content
Glama

get_templates

Retrieve email templates with performance metrics from Revenue Engine MCP to optimize communication strategies and track engagement results.

Instructions

Get message templates with performance metrics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler implementation for the 'get_templates' MCP tool. It calls the backend Google Apps Script API via the callAPI helper function with action 'getTemplates'.
    case "get_templates":
      result = await callAPI("getTemplates");
      break;
  • index.js:302-309 (registration)
    Registration of the 'get_templates' tool in the ListTools response, including its description and empty input schema (no parameters required).
    {
      name: "get_templates",
      description: "Get message templates with performance metrics",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • Input schema for the 'get_templates' tool, defining it as an object with no properties (parameterless tool).
    inputSchema: {
      type: "object",
      properties: {},
    },
  • Helper function callAPI used by the get_templates handler (and other tools) to make POST requests to the Google Apps Script backend API.
    async function callAPI(action, data = {}) {
      debugLog('=== API CALL START ===');
      debugLog(`Action: ${action}`);
      debugLog(`Data: ${JSON.stringify(data)}`);
    
      try {
        // Build form-encoded body for POST
        const formData = new URLSearchParams();
        formData.append('action', action);
    
        // Add all data fields to form
        for (const [key, value] of Object.entries(data)) {
          if (value !== undefined && value !== null) {
            formData.append(key, value.toString());
          }
        }
    
        const formString = formData.toString();
        debugLog(`FormData: ${formString}`);
        debugLog(`API_URL: ${API_URL}`);
    
        // Use POST with proper content type
        const response = await fetch(API_URL, {
          method: 'POST',
          headers: {
            'Content-Type': 'application/x-www-form-urlencoded',
          },
          body: formString
        });
    
        debugLog(`Response status: ${response.status}`);
        debugLog(`Response ok: ${response.ok}`);
    
        if (!response.ok) {
          debugLog(`Response not OK: ${response.status} ${response.statusText}`);
          throw new Error(`API request failed: ${response.status} ${response.statusText}`);
        }
    
        const text = await response.text();
        debugLog(`Response text length: ${text.length}`);
        debugLog(`Response text: ${text}`);
    
        if (!text) {
          debugLog('ERROR: Empty response from API');
          throw new Error('Empty response from API');
        }
    
        const parsed = JSON.parse(text);
        debugLog(`Parsed successfully: ${JSON.stringify(parsed)}`);
        debugLog('=== API CALL END ===');
        return parsed;
    
      } catch (error) {
        debugLog(`ERROR in callAPI: ${error.message}`);
        debugLog(`ERROR stack: ${error.stack}`);
        throw error;
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves data ('Get'), implying a read-only operation, but doesn't clarify if it requires specific permissions, has rate limits, returns paginated results, or what format the performance metrics are in. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior and constraints.

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: 'Get message templates with performance metrics'. It is front-loaded with the core action and resource, with no redundant words or unnecessary elaboration. Every word earns its place by specifying what is retrieved and what additional data is included.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks context on behavioral traits, usage guidelines, or output details. Without annotations or an output schema, the agent won't know the return format or any operational constraints, making this incomplete for informed use.

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?

The input schema has 0 parameters with 100% coverage, meaning no parameters are documented in the schema. The description doesn't add parameter details, which is appropriate since there are none to describe. According to the rules, 0 parameters warrants a baseline score of 4, as there's no need to compensate for missing schema information.

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 'Get message templates with performance metrics' clearly states the verb ('Get') and resource ('message templates'), including the scope of data returned ('with performance metrics'). It distinguishes this from generic data retrieval tools like 'get_dashboard' or 'get_metrics' by specifying the resource type. However, it doesn't explicitly differentiate from all siblings (e.g., 'get_email_content' might overlap in some contexts), preventing a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., authentication needs), exclusions, or comparisons to similar tools like 'get_email_content' or 'get_metrics'. The agent must infer usage based on the name and description alone, which is insufficient for optimal tool selection.

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/PromptishOperations/mcpSpec'

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