Skip to main content
Glama

Sitecore MCP Server

by GaryWenneker
SEARCH-API-STRUCTURE.md1.75 kB
# Test GraphQL Search Query for /sitecore/api/graph/items/master ## What we know from errors: - ❌ ContentSearchResults does NOT have `.total` field - ❌ ContentSearchResult does NOT have `.displayName` field - ❌ ContentSearchResult does NOT have `.template` field (has `.templateName` instead) - ❌ ContentSearchResult does NOT have `.hasChildren` field ## Likely correct fields (based on error suggestions): - ✅ ContentSearchResult has `.templateName` (string) - ✅ ContentSearchResult likely has `.name`, `.id`, `.path` (standard) ## Test query to find correct structure: ```graphql { search(keyword: "Home", language: "en", first: 1) { results { items { id name path templateName url language { name } } } } } ``` ## Expected structure based on /items/master endpoint: ```typescript interface ContentSearchResults { results: { items: ContentSearchResult[]; pageInfo?: { hasNextPage: boolean; endCursor: string; }; totalCount?: number; }; facets?: ContentSearchFacet[]; } interface ContentSearchResult { id: string; name: string; path: string; templateName: string; // NOT template { id, name } uri?: string; // NOT url! (uri, not url) language: string; // SCALAR String! (not object with .name) // NO: displayName, template, hasChildren, fields } ``` ## Fix needed in sitecore-service.ts: Change from Item-based fields to ContentSearchResult fields: - Remove: `displayName`, `template { id, name }`, `hasChildren`, `fields` - Use: `id`, `name`, `path`, `templateName`, `uri`, `language` (String!) - ⚠️ `uri` NOT `url` - ⚠️ `language` is String, NOT `language { name }`

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/GaryWenneker/SitecoreMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server