Skip to main content
Glama
vitaliiivanovspryker

Spryker Package Search Tool

search_spryker_packages

Search Spryker packages and modules in GitHub repositories using natural language queries to find relevant code and documentation.

Instructions

To search the Spryker package repository in Github

Input Schema

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

Implementation Reference

  • The handler function that executes the tool logic: normalizes query, validates organisations, builds GitHub search query, performs repository search, formats and returns results as text content.
    export const searchSprykerPackages = async ({query, organisations}) => {
        logger.info(`Received searchSprykerPackages request`, { query, organisations });
    
        try {
            const normalizedQuery = normalizeQuery(query);
    
            const validatedOrgs = validateOrganisations(organisations);
            logger.info(`Using organizations for searchSprykerPackages`, { organisations: validatedOrgs });
    
            const githubQuery = buildGitHubQuery(normalizedQuery, validatedOrgs);
    
            logger.info(`Performing GitHub repository searchSprykerPackages`, { query: githubQuery });
    
            const searchResults = await searchGitHubRepositories(githubQuery);
    
            logger.info(`GitHub searchSprykerPackages completed`, {
                resultCount: searchResults.items ? searchResults.items.length : 0,
                totalCount: searchResults.total_count
            });
    
            const formattedText = formatResults(searchResults.items, validatedOrgs);
            logger.debug(`Search results formatted for display`);
    
            return {
                content: [{
                    type: `text`,
                    text: formattedText
                }]
            };
        } catch (error) {
            logger.error(`Error in search: ${error.message}`, {
                error,
                stack: error.stack
            });
    
            return {
                content: [{
                    type: `text`,
                    text: `Error performing search: ${error.message}`
                }]
            };
        }
    }
  • src/index.js:38-53 (registration)
    Registers the 'search_spryker_packages' tool with the MCP server, specifying name, description, input parameters, and the handler function.
    server.tool(
        `search_spryker_packages`,
        `To search the Spryker package repository in Github`,
        {
            query: z
                .string()
                .max(120)
                .min(5)
                .describe(`The natural language query to search in Github`),
            organisations: z
                .array(z.string())
                .optional()
                .describe(`Optional array of organisations to filter by [\`spryker\`, \`spryker-eco\`, \`spryker-sdk\`, \`spryker-shop\``)
        },
        searchSprykerPackages
    );
  • Input schema definition using Zod: 'query' as string (min 5, max 120 chars), optional 'organisations' as array of strings with predefined options.
    {
        query: z
            .string()
            .max(120)
            .min(5)
            .describe(`The natural language query to search in Github`),
        organisations: z
            .array(z.string())
            .optional()
            .describe(`Optional array of organisations to filter by [\`spryker\`, \`spryker-eco\`, \`spryker-sdk\`, \`spryker-shop\``)
    },
  • Helper function to format the GitHub repository search results into readable text, specific to searchSprykerPackages.
    export const formatResults = (repositories, organisations) => {
        if (!repositories || repositories.length === 0) {
            return `No repositories found matching your searchSprykerPackages criteria.`;
        }
    
        let formattedText = `Found ${repositories.length} repositories:\n\n`;
    
        repositories.forEach((repo, index) => {
            formattedText += `${index + 1}. ${repo.name}\n`;
            formattedText += `   Description: ${repo.description || `No description available`}\n`;
            formattedText += `   URL: ${repo.html_url}\n\n`;
        });
    
        formattedText += `Search performed across organizations: ${organisations.join(`, `)}`;
    
        return formattedText;
    };
  • Helper function to construct the full GitHub search query by appending organization filters for searchSprykerPackages.
    export const buildGitHubQuery = (query, organisations) => {
        // Start with the base query
        let githubQuery = query;
    
        // Add organization filters
        if (organisations && organisations.length > 0) {
            const orgFilters = organisations.map(org => `org:${org}`).join(` `);
            githubQuery = `${githubQuery} ${orgFilters}`;
        }
    
        return githubQuery;
    };
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure but offers minimal information. It mentions searching Github but doesn't describe what type of results to expect, whether there are rate limits, authentication requirements, or how results are structured. This is inadequate for a search tool with zero annotation coverage.

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?

The description is a single, efficient sentence that gets straight to the point without unnecessary words. However, it could be slightly more informative while maintaining conciseness.

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

Completeness2/5

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

For a search tool with no annotations and no output schema, the description is insufficient. It doesn't explain what constitutes a 'package' in this context, what information is returned, or how results are presented. The agent would need to guess about the tool's behavior and output format.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description doesn't add any parameter-specific information beyond what's already in the schema (which has 100% coverage). It doesn't explain how the query should be formulated or what the organisations array actually filters. With complete schema documentation, the baseline score of 3 is appropriate.

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

Purpose4/5

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

The description clearly states the tool's purpose as searching the Spryker package repository in Github, which is a specific verb+resource combination. However, it doesn't explicitly distinguish this from its sibling tools (search_spryker_documentation_path and search_spryker_package_code), which likely search different content types within the same ecosystem.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus its siblings or alternatives. It doesn't mention any prerequisites, constraints, or typical use cases, leaving the agent to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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