Skip to main content
Glama
ishayoyo

Excel MCP Server

by ishayoyo

get_cell

Retrieve the value from a specific cell in Excel or CSV files using A1 notation. Specify file path and cell address to extract data for analysis.

Instructions

Get the value of a specific cell using A1 notation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesPath to the CSV or Excel file
cellYesCell address in A1 notation (e.g., "A1", "B5")
sheetNoSheet name for Excel files (optional)

Implementation Reference

  • The handler function that executes the get_cell tool. It reads the specified file/sheet, parses the A1 cell notation, validates bounds, retrieves the cell value, and returns it in a standardized ToolResponse format.
    async getCell(args: ToolArgs): Promise<ToolResponse> {
      try {
        const { filePath, cell, sheet } = args;
        const data = await readFileContent(filePath, sheet);
    
        if (!cell || typeof cell !== 'string') {
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify({
                  success: false,
                  error: 'Invalid cell reference',
                }, null, 2),
              },
            ],
          };
        }
    
        const { row, col } = parseA1Notation(cell);
    
        if (row >= data.length || col >= (data[0]?.length || 0)) {
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify({
                  success: false,
                  error: `Cell ${cell} is out of range`,
                }, null, 2),
              },
            ],
          };
        }
    
        const value = data[row][col];
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                success: true,
                cellValue: value,
                cellAddress: cell,
              }, null, 2),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                success: false,
                error: error instanceof Error ? error.message : 'Unknown error occurred',
              }, null, 2),
            },
          ],
        };
      }
    }
  • The input schema definition and tool metadata (name, description) for the get_cell tool, registered in the ListTools response.
      name: 'get_cell',
      description: 'Get the value of a specific cell using A1 notation',
      inputSchema: {
        type: 'object',
        properties: {
          filePath: {
            type: 'string',
            description: 'Path to the CSV or Excel file',
          },
          cell: {
            type: 'string',
            description: 'Cell address in A1 notation (e.g., "A1", "B5")',
          },
          sheet: {
            type: 'string',
            description: 'Sheet name for Excel files (optional)',
          },
        },
        required: ['filePath', 'cell'],
      },
    },
  • src/index.ts:1202-1202 (registration)
    The dispatch registration in the CallToolRequestSchema handler that routes calls to the getCell method on the DataOperationsHandler instance.
    return await this.dataOpsHandler.getCell(toolArgs);
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 reads a cell value but doesn't mention file format support (CSV/Excel), error handling for invalid cells or files, performance considerations, or output format. For a read operation with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.

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 uses specific terminology ('A1 notation') that adds precision without verbosity.

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 no annotations, no output schema, and a read operation with potential complexity (file formats, error cases), the description is incomplete. It doesn't address what happens with missing files, invalid cell references, or the return format, leaving the agent under-informed for reliable 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?

Schema description coverage is 100%, so the schema fully documents all parameters. The description adds minimal value beyond the schema by mentioning A1 notation, which is already implied in the schema's description for 'cell'. No additional semantics or usage examples are provided, meeting the baseline for high schema coverage.

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 resource ('value of a specific cell'), specifying the action and target. It distinguishes from siblings like 'get_range' by focusing on a single cell rather than a range, though it doesn't explicitly name alternatives. However, it lacks explicit sibling differentiation beyond the scope implied by 'specific cell'.

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 'get_range', 'read_file', or 'vlookup_helper'. It mentions A1 notation but doesn't specify use cases, prerequisites, or exclusions, leaving the agent to infer usage from the tool name and parameters 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/ishayoyo/excel-mcp'

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