spreadsheet-mcp 0.10.1

Stateful MCP server for spreadsheet analysis and editing — token-efficient tools for LLM agents to read, profile, edit, and recalculate .xlsx workbooks
Documentation
use thiserror::Error;

#[derive(Debug, Error)]
#[error("{message}")]
pub struct InvalidParamsError {
    tool: &'static str,
    message: String,
    path: Option<String>,
}

impl InvalidParamsError {
    pub fn new(tool: &'static str, message: impl Into<String>) -> Self {
        Self {
            tool,
            message: message.into(),
            path: None,
        }
    }

    pub fn with_path(mut self, path: impl Into<String>) -> Self {
        self.path = Some(path.into());
        self
    }

    pub fn tool(&self) -> &'static str {
        self.tool
    }

    pub fn message(&self) -> &str {
        &self.message
    }

    pub fn path(&self) -> Option<&str> {
        self.path.as_deref()
    }
}