Skip to main content
Glama
Obsidian MCP Server
by Kynlos

create_dataview_codeblock

Generates a Dataview query block in a specified Obsidian note, letting you embed dynamic queries for note listings and data views.

Instructions

Generate dataview query block in note

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": {
      "filename": "<filename>",
      "query": "<query>"
    },
    "name": "create_dataview_codeblock"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesDataview query
filenameYesTarget note filename

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full burden. 'Generate ... in note' implies a write to the target note, but it never says whether existing content is overwritten or the block is appended, whether the note must already exist, what happens on a missing file, or what is returned. For a mutation tool with zero annotation coverage this is a substantial gap.

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 terse sentence with no wasted words, and the action is front-loaded. However, the terseness shades into under-specification rather than disciplined brevity.

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?

The tool is simple (2 required params, no nesting, no output schema), and the schema fully documents inputs. Still, for an unannotated write operation, the definition omits side effects on the target note and any indication of the result, leaving an agent to infer how the write behaves.

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 description coverage is 100%, so both parameters (query, filename) are already documented as 'Dataview query' and 'Target note filename'. The description adds no format, syntax, or constraint detail beyond that, so the baseline of 3 applies.

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?

States a specific verb and resource: 'Generate dataview query block in note'. An agent can tell this creates a dataview code block inside a note, unlike execute_dataview_query or validate_dataview_query. It does not explicitly name those siblings, so the differentiation is inferred from the verb rather than stated.

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?

No when-to-use guidance at all. Nothing says whether to use this instead of execute_dataview_query, validate_dataview_query, or append_to_note, and no prerequisites or exclusions are given. The agent must guess the selection criterion from the sibling names alone.

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