Skip to main content
Glama
MikelA92

Metabase MCP Server

by MikelA92

get_field

Retrieve detailed metadata about a specific database field, including its data type, description, and column information to understand data structure.

Instructions

🔍 [SAFE] Get detailed information about a specific field/column including its type, description, and metadata. Use this to understand what a column contains. Risk: None - read-only operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldIdYesThe ID of the field

Implementation Reference

  • The main handler function that implements the logic for the 'get_field' tool. Validates input, fetches field details from Metabase API, and returns formatted MCP content.
      async getField(fieldId) {
        Validators.validateFieldId(fieldId);
        
        this.logger.debug('Getting field', { fieldId });
        const field = await this.apiClient.makeRequest(`/api/field/${fieldId}`);
        
        return {
          content: [
            {
              type: 'text',
              text: `Field Information:
    ID: ${field.id}
    Name: ${field.name}
    Display Name: ${field.display_name}
    Type: ${field.base_type}
    Semantic Type: ${field.semantic_type || 'None'}
    Description: ${field.description || 'No description'}
    Table: ${field.table?.name}`,
            },
          ],
        };
      }
  • The tool schema definition for 'get_field', including input schema with fieldId parameter validation.
    {
      name: 'get_field',
      description: '🔍 [SAFE] Get detailed information about a specific field/column including its type, description, and metadata. Use this to understand what a column contains. Risk: None - read-only operation.',
      inputSchema: {
        type: 'object',
        properties: {
          fieldId: {
            type: 'integer',
            description: 'The ID of the field',
            minimum: 1,
          },
        },
        required: ['fieldId'],
      },
    },
  • Registration of the 'get_field' tool in the MCP server's executeTool switch statement, dispatching to the fieldHandlers instance.
    case 'get_field':
      return await this.fieldHandlers.getField(args.fieldId);
  • Instantiation of the FieldHandlers class, which provides the getField method used by the tool.
    this.fieldHandlers = new FieldHandlers(this.apiClient);
  • Import of the FieldHandlers module containing the getField handler.
    import { FieldHandlers } from './handlers/fieldHandlers.js';
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explicitly states the operation is 'read-only' and 'Risk: None', which clearly communicates safety and non-destructive behavior. However, it doesn't mention potential limitations like rate limits, authentication needs, or error conditions, leaving some behavioral aspects uncovered.

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 efficiently structured in two sentences: the first states the purpose and what information is retrieved, the second provides usage guidance and risk assessment. Every element adds value with no wasted words, and it's appropriately front-loaded with the core functionality.

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?

For a single-parameter read-only tool with no output schema, the description does well by explaining the purpose, usage context, and safety. However, it doesn't describe the return format (e.g., what 'detailed information' includes structurally) or potential error cases, which would help an agent handle responses better. The safety disclosure partially compensates for the lack of annotations.

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% (the single parameter 'fieldId' is fully described in the schema), so the baseline is 3. The description doesn't add any parameter-specific information beyond what's in the schema, such as examples of field IDs or how to obtain them, but doesn't need to compensate for gaps either.

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?

The description clearly states the verb 'Get' and the resource 'detailed information about a specific field/column', specifying what information is retrieved (type, description, metadata) and why (to understand what a column contains). It distinguishes from siblings like get_field_values (which retrieves data values) and get_table_metadata (which focuses on table-level info).

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?

The description provides clear context for when to use this tool ('to understand what a column contains'), but does not explicitly state when not to use it or name specific alternatives. It implies usage for metadata retrieval rather than data retrieval, which helps differentiate from some siblings, but lacks explicit exclusions or comparisons.

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/MikelA92/metabase-mcp-mab'

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