Skip to main content
Glama
deyikong

SendGrid MCP Server

by deyikong

List Custom Fields

list_custom_fields

Retrieve all custom fields defined in your SendGrid account to organize and segment contact data for targeted email campaigns.

Instructions

List all custom fields

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_custom_fields' tool. It makes an API request to SendGrid's marketing/field_definitions endpoint and returns the result as formatted JSON.
    handler: async (): Promise<ToolResult> => {
      const result = await makeRequest("https://api.sendgrid.com/v3/marketing/field_definitions");
      return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
    },
  • The configuration object defining the tool's title and description, used for schema generation in MCP.
    config: {
      title: "List Custom Fields",
      description: "List all custom fields",
    },
  • src/index.ts:21-23 (registration)
    The registration code in the main MCP server file that registers all tools, including 'list_custom_fields', by iterating over allTools and calling registerTool.
    for (const [name, tool] of Object.entries(allTools)) {
      server.registerTool(name, tool.config as any, tool.handler as any);
    }
  • Spreading of contactTools into allTools, making 'list_custom_fields' available for registration.
    ...contactTools,
  • Export of contactTools object containing the 'list_custom_fields' tool definition.
    export const contactTools = {
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. 'List all custom fields' implies a read-only operation but lacks details on permissions, rate limits, pagination, or response format. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place by directly conveying the tool's purpose.

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 low complexity (0 parameters, no output schema), the description is minimally adequate but lacks depth. It covers the basic purpose but misses behavioral context (e.g., response format, pagination) that would help an agent use it effectively, especially with no annotations to fill gaps.

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 no parameters (parameter count: 0), and schema description coverage is 100%, so the schema fully documents the absence of inputs. The description doesn't add parameter details, which is unnecessary here, but it correctly implies no filtering or arguments are needed, aligning with the schema.

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 'List all custom fields' clearly states the verb ('List') and resource ('custom fields'), making the tool's purpose immediately understandable. It distinguishes from siblings like 'create_custom_field' and 'update_custom_field' by indicating a read-only operation, though it doesn't explicitly differentiate from other list tools (e.g., 'list_contacts', 'list_templates') beyond the resource type.

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., whether custom fields must exist), exclusions, or comparisons to other list tools on the server, 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

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/deyikong/sendgrid-mcp'

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