Skip to main content
Glama
xlsx-for-ai

xlsx-for-ai

by senoff

xlsx_post_teams

Destructive

Post an .xlsx spreadsheet to a Microsoft Teams channel as a file attachment, with an optional message.

Instructions

Use this when you need to post a spreadsheet to a Microsoft Teams channel as a file attachment, with an optional accompanying message.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file_path": "<file_path>",
      "team_id": "<team_id>",
      "channel_id": "<channel_id>"
    },
    "name": "xlsx_post_teams"
  }
}

Input Schema

NameRequiredDescriptionDefault
messageNoOptional: message to post alongside the file. Plain text; will be HTML-escaped server-side.
team_idYesMicrosoft Teams team ID (GUID). Find via Graph: GET /me/joinedTeams.
filenameNoOptional: filename Teams will display. Defaults to the basename of file_path.
file_pathYesAbsolute path to the .xlsx file to post.
channel_idYesMicrosoft Teams channel ID. Find via Graph: GET /teams/{team-id}/channels.
graph_tokenNoMicrosoft Graph access token (JWT). Optional when TEAMS_GRAPH_TOKEN env var is set. Passing the token here exposes it in MCP conversation logs — prefer the env var. Must have file-upload + channel-message-send scopes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed17 schema fields changedv4.3.1
    • addedInput schema / properties / channel_id / description
      Added value: +"Microsoft Teams channel ID. Find via Graph: GET /teams/{team-id}/channels."
    • removedInput schema / properties / channel_id / maxLength
      Removed value: -128
    • removedInput schema / properties / channel_id / minLength
      Removed value: -1
    • removedInput schema / properties / file_b64
      Removed value: -{
      -  "type": "string"
      -}
    • addedInput schema / properties / file_path
      Added value: +{
      +  "description": "Absolute path to the .xlsx file to post.",
      +  "type": "string"
      +}
    • addedInput schema / properties / filename / description
      Added value: +"Optional: filename Teams will display. Defaults to the basename of file_path."
    • removedInput schema / properties / filename / maxLength
      Removed value: -128
    • addedInput schema / properties / graph_token / description
      Added value: +"Microsoft Graph access token (JWT). Optional when TEAMS_GRAPH_TOKEN env var is set. Passing the token here exposes it in MCP conversation logs — prefer the env var. Must have file-upload + channel-message-send scopes."
    • removedInput schema / properties / graph_token / maxLength
      Removed value: -8192
    • removedInput schema / properties / graph_token / minLength
      Removed value: -100
    • addedInput schema / properties / message / description
      Added value: +"Optional: message to post alongside the file. Plain text; will be HTML-escaped server-side."
    • removedInput schema / properties / message / maxLength
      Removed value: -4000
    • addedInput schema / properties / team_id / description
      Added value: +"Microsoft Teams team ID (GUID). Find via Graph: GET /me/joinedTeams."
    • removedInput schema / properties / team_id / maxLength
      Removed value: -128
    • removedInput schema / properties / team_id / minLength
      Removed value: -1
    • removedInput schema / properties / workbook_handle
      Removed value: -{
      -  "maxLength": 128,
      -  "minLength": 1,
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "channel_id",
      -  "graph_token",
      -  "team_id"
      -]New value: +[
      +  "file_path",
      +  "team_id",
      +  "channel_id"
      +]
  2. First observedv3.2.1

TDQS

B3.1/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, idempotentHint=false and openWorldHint=true, so the safety profile is largely covered. The description adds nothing further: it does not say what happens if a file of the same name already exists, that the post creates a visible channel message, or what a failure looks like. It does not contradict the annotations, but it contributes no behavioral context of its own.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler; the 'Use this when' framing puts the trigger first. Slightly loose in calling it a 'spreadsheet' when file_path is specifically an .xlsx path, but that is minor.

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 non-idempotent, destructive, open-world write to an external service with no output schema, the definition is thin. An agent gets no sense of whether the call overwrites an existing attachment, what a success response contains (e.g., a message ID or URL), or what error conditions to expect, so it cannot reason about retries or verification.

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 coverage is 100% and the parameter descriptions are unusually good — Graph lookup paths for team_id and channel_id, a default rule for filename, and an explicit security note about exposing graph_token in logs. The description itself adds no parameter meaning, so the baseline 3 applies, though the schema is doing more than typical work.

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 names a specific verb (post), a specific resource (a spreadsheet/.xlsx file) and a specific destination (a Microsoft Teams channel) as a file attachment with an optional message. That implicitly distinguishes it from the sibling xlsx_post_slack, though it never states the contrast outright.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'Use this when you need to...' clause gives an explicit trigger condition, which is better than nothing. But it offers no when-not guidance, no mention of the Slack counterpart as an alternative, and no prerequisites such as bot membership in the channel or the env-var token path.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.