Skip to main content
Glama
dkmaker

mcp-azure-tablestorage

get_table_schema

Retrieve property names and types from a specified table in Azure Table Storage to analyze its structure.

Instructions

Get property names and types from a table

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableNameYesName of the table to analyze

Implementation Reference

  • The handler function for the get_table_schema tool. It creates a TableClient for the given table, iterates over all entities, collects unique property names and their types (using typeof), builds a schema map, and returns it as JSON text content.
    private async handleGetTableSchema(args: GetSchemaArgs) {
      const tableClient = TableClient.fromConnectionString(
        this.connectionString,
        args.tableName
      );
    
      const propertyMap = new Map<string, Set<string>>();
      const iterator = tableClient.listEntities();
      
      for await (const entity of iterator) {
        Object.entries(entity).forEach(([key, value]) => {
          if (!propertyMap.has(key)) {
            propertyMap.set(key, new Set());
          }
          propertyMap.get(key)?.add(typeof value);
        });
      }
    
      const schema = Object.fromEntries(
        Array.from(propertyMap.entries()).map(([key, types]) => [
          key,
          Array.from(types),
        ])
      );
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(schema, null, 2),
          },
        ],
      };
    }
  • src/index.ts:115-128 (registration)
    Registration of the get_table_schema tool in the ListTools response, including name, description, and JSON inputSchema.
    {
      name: 'get_table_schema',
      description: 'Get property names and types from a table',
      inputSchema: {
        type: 'object',
        properties: {
          tableName: {
            type: 'string',
            description: 'Name of the table to analyze',
          },
        },
        required: ['tableName'],
      },
    },
  • src/index.ts:159-166 (registration)
    Dispatch case in the CallToolRequestHandler that validates the tableName argument and invokes the handleGetTableSchema method.
    case 'get_table_schema':
      const schemaArgs = request.params.arguments as Record<string, unknown>;
      if (typeof schemaArgs?.tableName !== 'string') {
        throw new McpError(ErrorCode.InvalidParams, 'tableName is required and must be a string');
      }
      return await this.handleGetTableSchema({
        tableName: schemaArgs.tableName
      });
  • TypeScript interface defining the input arguments for the get_table_schema handler.
    interface GetSchemaArgs {
      tableName: string;
    }
Behavior2/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 states a read operation ('Get'), implying it is likely non-destructive, but does not address permissions, rate limits, error handling, or output format. This leaves significant gaps in understanding how the tool behaves beyond its basic function.

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 that directly states the tool's purpose without unnecessary words. It is front-loaded with the core action and resource, making it easy to parse quickly.

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?

Given the lack of annotations and output schema, the description is incomplete for a tool that retrieves schema information. It does not explain what the output looks like (e.g., a list of properties with types), potential errors, or dependencies, leaving the agent with insufficient context for effective use.

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?

The input schema has 100% description coverage, with 'tableName' clearly documented. The description adds no additional parameter details beyond what the schema provides, such as examples or constraints. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

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 clearly states the verb 'Get' and the resource 'property names and types from a table', making the purpose specific and understandable. However, it does not explicitly differentiate from sibling tools like 'list_tables' (which likely lists table names) or 'query_table' (which likely queries table data), leaving room for ambiguity in tool selection.

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 like 'list_tables' or 'query_table'. It lacks context such as prerequisites, typical use cases, or exclusions, leaving the agent to infer usage based on tool names 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

Related 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/dkmaker/mcp-azure-tablestorage'

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