Skip to main content
Glama

write_css_snippet

Create or overwrite an Obsidian CSS snippet and enable it to restyle your vault's appearance.

Instructions

Create or overwrite a CSS snippet (and enable it) to restyle Obsidian.

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": {
      "name": "<name>",
      "css": "<css>"
    },
    "name": "write_css_snippet"
  }
}

Input Schema

NameRequiredDescriptionDefault
cssYes
nameYes
vaultNoVault name, id or folder path (see list_vaults). Default: OBSIDIAN_VAULT or the vault open in Obsidian.
enableNoDefault true

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare this is a non-read-only, non-destructive, non-idempotent write, and the description adds the important behavioral detail that an existing snippet of the same name is replaced and that the snippet is enabled as a side effect. It stops short of saying whether the previous file content is recoverable or what is returned.

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?

A single front-loaded sentence with no filler; every clause carries information (create/overwrite, enable side effect, target context).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple four-parameter write tool with no output schema, the description covers the essential effect and the overwrite/enable behavior. It leaves the name-to-file mapping and the response (does it return a path or snippet id?) unspecified, which an agent must discover by calling.

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 50%: vault and enable are documented in the schema, while name and css are bare strings. The description does not clarify whether name is a filename with or without a .css extension or whether css must be raw stylesheet text, so it only partially compensates for the gap.

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 gives a specific verb pair ('create or overwrite') plus the resource ('CSS snippet') and its effect ('restyle Obsidian'). That is enough to distinguish it from content-writing siblings like write_note, though it does not explicitly name set_css_snippet_enabled or list_css_snippets as the neighboring CSS tools.

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 phrase 'create or overwrite' implies the calling context (writing a snippet file that may already exist), but the description never states when to prefer this over set_css_snippet_enabled or how to inspect existing snippets first. Usage is inferable rather than instructed.

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

Deploy Server

Other Tools