Skip to main content
Glama
deyikong

SendGrid MCP Server

by deyikong

Delete Custom Field

delete_custom_field

Remove a custom field definition from SendGrid contact management by specifying its ID to clean up unused data fields.

Instructions

Delete a custom field definition

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
field_idYesID of the custom field to delete

Implementation Reference

  • The handler function for the 'delete_custom_field' tool. It checks read-only mode and sends a DELETE request to the SendGrid API to delete the custom field.
    handler: async ({ field_id }: { field_id: string }): Promise<ToolResult> => {
      const readOnlyCheck = checkReadOnlyMode();
      if (readOnlyCheck.blocked) {
        return { content: [{ type: "text", text: readOnlyCheck.message! }] };
      }
      
      const result = await makeRequest(`https://api.sendgrid.com/v3/marketing/field_definitions/${field_id}`, {
        method: "DELETE",
      });
      return { content: [{ type: "text", text: `Custom field ${field_id} deleted successfully.` }] };
    },
  • Input schema using Zod for the delete_custom_field tool, defining the required field_id parameter.
    inputSchema: {
      field_id: z.string().describe("ID of the custom field to delete"),
    },
  • Tool registration within contactTools object, defining config (including schema) and handler for delete_custom_field.
    delete_custom_field: {
      config: {
        title: "Delete Custom Field",
        description: "Delete a custom field definition",
        inputSchema: {
          field_id: z.string().describe("ID of the custom field to delete"),
        },
      },
      handler: async ({ field_id }: { field_id: string }): Promise<ToolResult> => {
        const readOnlyCheck = checkReadOnlyMode();
        if (readOnlyCheck.blocked) {
          return { content: [{ type: "text", text: readOnlyCheck.message! }] };
        }
        
        const result = await makeRequest(`https://api.sendgrid.com/v3/marketing/field_definitions/${field_id}`, {
          method: "DELETE",
        });
        return { content: [{ type: "text", text: `Custom field ${field_id} deleted successfully.` }] };
      },
    },
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. 'Delete' implies a destructive mutation, but the description doesn't specify whether this action is reversible, what permissions are required, what happens to associated data, or any rate limits. This is inadequate for a destructive operation with zero annotation coverage.

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 appropriately sized for a simple delete operation and front-loads the core action without unnecessary elaboration.

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 destructive mutation tool with no annotations and no output schema, the description is insufficient. It doesn't address critical context like what 'delete' entails (permanent removal? soft delete?), what happens to data using this field, error conditions, or return values. The description should provide more behavioral context given the tool's nature.

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 100% with one parameter clearly documented. The description doesn't add any parameter details beyond what the schema provides ('field_id' with its description). With high schema coverage, the baseline score of 3 is appropriate as the description doesn't enhance parameter understanding.

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 'Delete a custom field definition' clearly states the verb (delete) and resource (custom field definition). It distinguishes from siblings like 'delete_contact' or 'delete_template' by specifying the resource type. However, it doesn't explicitly differentiate from 'update_custom_field' in terms of action specificity.

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 the field must exist), consequences (e.g., data loss implications), or when to choose this over similar tools like 'update_custom_field' for field modifications.

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