Skip to main content
Glama
Antonytm

mcp-sitecore-server

by Antonytm

create-component-datasource

Creates a Sitecore datasource item for a component, using the rendering's Datasource Template and Location. Supports page-local or shared placement and sets provided field values.

Instructions

Creates the datasource item for a component, using the Datasource Template and Datasource Location declared on the rendering itself. placement='page-local' (default) creates /Data/ and returns the layout reference form 'local:/Data/' that authored pages use; placement='shared' resolves the rendering's pipe-separated Datasource Location candidates in order and creates the item in the first that exists, returning the item ID to reference it by. Fails naming every candidate it tried when none resolves, rather than guessing at a location. Pass the field values in 'fields' and they are set on the new item.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoName for the new item. Defaults to '<RenderingName> <n>' with the lowest free n, which is the convention the authored pages use (e.g. 'RichText 1').
pathNoThe full path of the item, database prefix optional (e.g. master:/sitecore/content/Stride/Cova/Home or /sitecore/content/Stride/Cova/Home). Supply this or pageId.
fieldsNoField values to set on the new item, keyed by Sitecore field name.
pageIdNoThe ID of the page item (e.g. {110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}). Supply this or path.
databaseNoThe database to read. Defaults to master, and is ignored when path carries its own prefix.
languageNoThe item language. Defaults to the context language.
placementNoWhere to create the datasource. 'page-local' (default) puts it under <page>/Data, referenced from the layout as local:/Data/<name>, so it lives and dies with the page. 'shared' puts it in the site Data folder that the rendering's Datasource Location resolves to, for content reused across pages.
renderingIdNoID of the rendering definition item (e.g. {AD10DB7C-C944-42D9-9563-1F1070CC922E}). Supply this or renderingPath.
renderingPathNoPath of the rendering definition item (e.g. /sitecore/layout/Renderings/Project/Stride/RichText). Supply this or renderingId.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.5

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only declare a non-readonly, non-destructive write, so the description carries most of the behavioral load and does so well: it discloses the layout-reference return form for page-local, the item-ID return for shared, and the failure mode ('fails naming every candidate it tried when none resolves, rather than guessing'). Permissions/auth requirements are not addressed, keeping it from a 5.

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?

Three front-loaded sentences that lead with the core action before drilling into placement semantics. Dense but each clause carries information; only the slightly long placement sentence risks over-explanation.

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

Completeness4/5

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

For a 9-parameter, zero-required creation tool with no output schema, the description supplies the missing return-value semantics and error behavior. It leaves minor gaps around authentication/permissions, but an agent has enough to call it correctly.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema: it explains placement's effect on path and return value and confirms that 'fields' are set on the new item. The name-defaulting convention is described in both places but the description reinforces it coherently.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: it 'creates the datasource item for a component', and grounds it in the rendering's Datasource Template and Location. This clearly distinguishes it from generic item creators like authoring-create-item and item-service-create-item.

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

Usage Guidelines4/5

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

Explains the two placement modes and when each applies ('lives and dies with the page' vs 'reused across pages'), which is genuine when-to-use guidance. It stops short of naming alternative sibling tools for other creation scenarios, so it is clear context without explicit alternatives.

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