search_spryker_documentation_path
Find Spryker documentation URLs by entering natural language queries to locate specific help resources and technical guides.
Instructions
To search Spryker documentation path urls by query
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The natural language query to search Spryker documentation path url |
Implementation Reference
- src/tools.js:102-143 (handler)The handler function searchSprykerDocs that implements the core logic of the tool: normalizes query, builds GitHub search for spryker-docs MD files, fetches results via searchGitHubCode, formats with formatDocsResults, and returns markdown text.
export const searchSprykerDocs = async ({query}) => { logger.info(`Received searchSprykerDocs request`, { query }); try { const normalizedQuery = normalizeQuery(query); // Fixed search scope: only spryker/spryker-docs repository with MD files const githubQuery = `${normalizedQuery} repo:spryker/spryker-docs path:docs/ in:file extension:md`; logger.info(`Performing GitHub docs search`, { query: githubQuery }); const searchResults = await searchGitHubCode(githubQuery); logger.info(`GitHub docs search completed`, { resultCount: searchResults.items ? searchResults.items.length : 0, totalCount: searchResults.total_count }); // Format results similar to code search but with a different header const formattedText = formatDocsResults(searchResults.items); logger.debug(`Docs search results formatted for display`); return { content: [{ type: `text`, text: formattedText }] }; } catch (error) { logger.error(`Error in docs search: ${error.message}`, { error, stack: error.stack }); return { content: [{ type: `text`, text: `Error performing docs search: ${error.message}` }] }; } } - src/index.js:72-83 (registration)Tool registration in the MCP server, including the tool name, description, input schema (Zod validation for query parameter), and reference to the handler function.
server.tool( `search_spryker_documentation_path`, `To search Spryker documentation path urls by query`, { query: z .string() .max(120) .min(5) .describe(`The natural language query to search Spryker documentation path url`) }, searchSprykerDocs ); - src/index.js:76-81 (schema)Input schema definition using Zod for the query parameter: string between 5-120 chars.
query: z .string() .max(120) .min(5) .describe(`The natural language query to search Spryker documentation path url`) },