search_spryker_documentation_path
Search Spryker documentation path URLs using natural language queries to quickly locate relevant resources within the Spryker ecosystem.
Instructions
To search Spryker documentation path urls by query
Input Schema
TableJSON 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 for the `search_spryker_documentation_path` tool. It performs a GitHub code search scoped to spryker/spryker-docs Markdown files, formats the results, and returns them as text content.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)Registration of the `search_spryker_documentation_path` tool on the MCP server, including input schema validation using Zod for the `query` parameter and reference to the `searchSprykerDocs` handler.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:75-81 (schema)Zod schema defining the input parameters for the tool: a string `query` with length constraints and description.{ query: z .string() .max(120) .min(5) .describe(`The natural language query to search Spryker documentation path url`) },