mcp-sunsama: Command for Claude Code

.claude/commands/upgrade-sunsama-api.md

upgrade-sunsama-api is a command for Claude Code from robertn702/mcp-sunsama. It costs 9 tokens per session (610 once invoked), scanned A, original, MIT.

A maintenance workflow for the sunsama-api package, a software library used by the project, and its MCP tools, which let an agent call the library through defined operations.

In plain words
What is it for?
Use it to upgrade sunsama-api, run type checks and tests, compare available API methods with existing tools, and add schemas and tool implementations for missing methods.
Why use it?
It checks for a newer package version, verifies the project still builds and tests, and identifies library methods that the project has not exposed as tools.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter.

This is robertn702/mcp-sunsama's own configuration. It tells Claude Code how to work on mcp-sunsama itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mcp-sunsama configures →

Reuse

Borrowing it

Nothing to install: this file belongs to robertn702/mcp-sunsama. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/robertn702/mcp-sunsama/main/.claude/commands/upgrade-sunsama-api.md
Clone the repo
git clone --depth 1 https://github.com/robertn702/mcp-sunsama

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for upgrade-sunsama-api

README.md
[![agentmods](https://agentmods.dev/badge/commands/robertn702/mcp-sunsama/upgrade-sunsama-api/github.svg)](https://agentmods.dev/commands/robertn702/mcp-sunsama/upgrade-sunsama-api)
Your own site
<a href="https://agentmods.dev/commands/robertn702/mcp-sunsama/upgrade-sunsama-api"><img src="https://agentmods.dev/badge/commands/robertn702/mcp-sunsama/upgrade-sunsama-api/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for upgrade-sunsama-api

Your own site · 80×15
<a href="https://agentmods.dev/commands/robertn702/mcp-sunsama/upgrade-sunsama-api"><img src="https://agentmods.dev/badge/commands/robertn702/mcp-sunsama/upgrade-sunsama-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 610 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00009 $0.00610
Opus 5 $0.00005 $0.00305
Sonnet 5 $0.00002 $0.00122
Haiku 4.5 $0.00001 $0.00061

Measured 10d ago against content hash a336f4274c78, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

upgrade-sunsama-api scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/upgrade-sunsama-api.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Upgrade the sunsama-api dependency to the latest version and ensure all new endpoints are wrapped as MCP tools.

Steps

  1. Check current vs latest version:

    cat package.json | grep sunsama-api
    npm view sunsama-api version
    
    • If already on latest, inform user and stop
  2. Upgrade the dependency:

    bun add sunsama-api@latest
    
  3. Verify build passes:

    bun run typecheck
    bun test
    
    • If either fails, stop and report the issue
  4. Analyze new API methods:

    • Read node_modules/sunsama-api/dist/types/client/index.d.ts to find the method class hierarchy
    • Read each method class file to enumerate all public methods on SunsamaClient
    • Compare against existing tools in src/tools/ to find unwrapped methods
    • Report: "Found X new methods not wrapped as MCP tools: [list]"
  5. For each unwrapped method:

    • Read the method signature and JSDoc from the sunsama-api type definitions
    • Read the corresponding types from node_modules/sunsama-api/dist/types/types/api.d.ts
    • Add the appropriate Zod schema to src/schemas.ts following existing patterns
    • Add the tool implementation to the appropriate file in src/tools/:
      • User operations → user-tools.ts
      • Task operations → task-tools.ts
      • Stream operations → stream-tools.ts
      • Calendar operations → calendar-tools.ts
    • Update src/tools/index.ts if a new tools file was created
  6. Verify new tools work:

    bun run typecheck
    bun test
    
  7. Create changeset:

    • If only dependency bump (no new tools): patch changeset
    • If new tools added: minor changeset
    • Write changeset to .changeset/ with descriptive summary
  8. Report summary:

    • Previous version → new version
    • New methods found
    • Tools added (if any)
    • Changeset created

Notes

  • Follow existing patterns in src/tools/ for tool structure
  • Use withTransportClient wrapper for all tools
  • Prefer formatJsonResponse for single objects, formatTsvResponse for arrays
  • Don't use as type assertions — if needed, request schema exports from sunsama-api
  • Run typecheck after each file modification to catch errors early

Read the full file on GitHub · 71 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 71 lines · 9 tokens per session scan A a336f4274c78

Subscribe to this mod's changes

upgrade-sunsama-api is a command published in the GitHub repository robertn702/mcp-sunsama (52 stars, last pushed 6mo ago), licensed MIT. It adds 9 tokens to every session and 610 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.