Skip to main content
Glama
Obsidian CDP MCP Server

Obsidian CDP MCP Server

obsidian_get_selection

Retrieves the selected text from the active Obsidian editor so you can use it in context-aware workflows or commands.

Instructions

Get the currently selected text in the active editor.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "obsidian_get_selection"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.9.2

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does not explain what happens when there is no active editor or no current selection, nor whether the result is empty text, an error, or some other fallback.

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 definition is a single front-loaded sentence with no redundant wording. Every part of the sentence contributes to identifying the resource and its scope.

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 zero-parameter getter, the description identifies the target resource adequately. However, without annotations or an output schema, it should say more about the return value and edge cases such as an empty selection or inactive editor.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

This tool has zero parameters, so there is no parameter semantics for the description to clarify. The baseline for a parameterless tool is 4, and nothing here introduces ambiguity about inputs.

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 uses a specific verb, 'Get', and a clearly scoped resource, 'currently selected text in the active editor'. It is immediately distinguishable from broad file-reading tools, but it does not explicitly contrast with the replace-selection sibling.

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 implies when the tool is useful by mentioning the active editor and current selection, but it provides no explicit when-to-use guidance, no exclusions, and no alternative tool to choose when the selection is absent or when cursor position is needed.

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