Skip to main content
Glama

search_spryker_package_code

Search code in Spryker GitHub repositories using natural language queries. Filter results by specific organisations to quickly locate modules and documentation.

Instructions

To search code in Spryker GitHub repositories

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organisationsNoOptional array of organisations to filter by [`spryker`, `spryker-eco`, `spryker-sdk`, `spryker-shop`
queryYesThe natural language query to search in code of Spryker packages

Implementation Reference

  • src/index.js:55-70 (registration)
    Registration of the 'search_spryker_package_code' tool, including name, description, schema, and handler reference.
    server.tool( `search_spryker_package_code`, `To search code in Spryker GitHub repositories`, { query: z .string() .max(120) .min(5) .describe(`The natural language query to search in code of Spryker packages`), organisations: z .array(z.string()) .optional() .describe(`Optional array of organisations to filter by [\`spryker\`, \`spryker-eco\`, \`spryker-sdk\`, \`spryker-shop\``) }, searchSprykerCode );
  • Input schema using Zod for the tool parameters: query (string) and optional organisations (array of strings).
    { query: z .string() .max(120) .min(5) .describe(`The natural language query to search in code of Spryker packages`), organisations: z .array(z.string()) .optional() .describe(`Optional array of organisations to filter by [\`spryker\`, \`spryker-eco\`, \`spryker-sdk\`, \`spryker-shop\``) },
  • The main handler function that normalizes the query, builds a GitHub code search query filtered by PHP files in Spryker orgs, calls searchGitHubCode, formats results with formatCodeResults, and returns markdown text content.
    export const searchSprykerCode = async ({query, organisations}) => { logger.info(`Received searchSprykerCode request`, { query, organisations }); try { const normalizedQuery = normalizeQuery(query); const validatedOrgs = validateOrganisations(organisations); logger.info(`Using organizations for code search`, { organisations: validatedOrgs }); const githubQuery = buildGitHubQuery(normalizedQuery, validatedOrgs) + ` in:file` + ` language:php`; logger.info(`Performing GitHub code search`, { query: githubQuery }); const searchResults = await searchGitHubCode(githubQuery); logger.info(`GitHub code search completed`, { resultCount: searchResults.items ? searchResults.items.length : 0, totalCount: searchResults.total_count }); const formattedText = formatCodeResults(searchResults.items, validatedOrgs); logger.debug(`Code search results formatted for display`); return { content: [{ type: `text`, text: formattedText }] }; } catch (error) { logger.error(`Error in code search: ${error.message}`, { error, stack: error.stack }); return { content: [{ type: `text`, text: `Error performing code search: ${error.message}` }] }; } }

Other Tools

Related Tools

Latest Blog Posts

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/vitaliiivanovspryker/spryker-package-search-mcp'

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