Skip to main content
Glama

search_swift_packages

Search Swift Package Index for packages by criteria like keywords, author, stars, platforms, license, and activity dates to find dependencies for Swift projects.

Instructions

Search the Swift Package Index for packages matching your criteria.

This is a QUERY tool — read-only, safe to call multiple times.

At least one parameter must be provided. Parameters are combined with AND logic.

Args: query: Free-text search (e.g. "networking", "json parsing"). author: Filter by repository owner (e.g. "apple", "vapor"). Prefix with "!" to exclude (e.g. "!vapor"). keyword: Filter by package keyword tag (e.g. "server", "ui"). Prefix with "!" to exclude (e.g. "!deprecated"). min_stars: Minimum GitHub star count (e.g. 100, 1000). max_stars: Maximum GitHub star count. platforms: Filter by compatible platform(s). Multiple = AND (must support all). Valid: ios, macos, watchos, tvos, visionos, linux. license_filter: License filter. Use "compatible" for App Store compatible, or a specific SPDX ID like "mit", "apache-2.0", "lgpl-2.1". Prefix with "!" to exclude (e.g. "!gpl-3.0"). last_activity_after: ISO8601 date (YYYY-MM-DD). Only packages with maintenance activity after this date. Example: "2024-01-01". last_activity_before: ISO8601 date (YYYY-MM-DD). Only packages with maintenance activity before this date. Combine with last_activity_after for a date window. last_commit_after: ISO8601 date (YYYY-MM-DD). Only packages with commits after this date. last_commit_before: ISO8601 date (YYYY-MM-DD). Only packages with commits before this date. Combine with last_commit_after for a date window. product_type: Filter by product type: library, executable, plugin, or macro. page: Page number for pagination (default 1). Check has_more in the response.

If you are unsure what values are valid for platforms or product_type, call list_search_filters() first. After getting results, use get_package_readme(owner, repo) to read the README of any package that looks interesting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNo
authorNo
keywordNo
min_starsNo
max_starsNo
platformsNo
license_filterNo
last_activity_afterNo
last_activity_beforeNo
last_commit_afterNo
last_commit_beforeNo
product_typeNo
pageNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageYesCurrent page number (1-indexed)
queryYesThe raw SPI query string that was executed
resultsYesList of matching packages
has_moreYesWhether more results are available on the next page
next_stepYesSuggested next action for the agent
result_countYesNumber of results on this page
spi_search_urlYesDirect URL to view these results on swiftpackageindex.com
Behavior5/5

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

Annotations are absent, so the description carries full disclosure burden and succeeds excellently. It explicitly states 'This is a QUERY tool — read-only, safe to call multiple times', disclosing idempotency and safety. It also reveals pagination behavior ('Check has_more in the response') and parameter constraints ('At least one parameter must be provided').

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 necessarily lengthy given 13 undocumented parameters, but remains well-structured with clear sectioning (opening statement, behavioral note, constraint, Args list, workflow guidance). Every sentence earns its place—the examples and exclusion syntax ('!') are critical for usage. Minor deduction only because the verbosity is forced by poor schema coverage rather than perfect conciseness.

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

Completeness5/5

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

Given 13 optional parameters, zero schema descriptions, no annotations, but presence of an output schema, the description achieves completeness. It documents all parameters, explains response handling ('Check has_more'), states constraints, provides workflow integration with siblings, and covers behavioral traits—leaving no significant gaps for an agent to invoke this incorrectly.

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

Parameters5/5

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

With schema description coverage at 0% per context signals, the description comprehensively compensates by documenting all 13 parameters in the Args section. It provides semantic meaning (e.g., 'Filter by repository owner'), syntax details ('Prefix with "!" to exclude'), format examples ('ISO8601 date (YYYY-MM-DD)'), and valid value lists ('ios, macos...') that are completely absent from the schema.

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

Purpose5/5

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

The description opens with a specific verb ('Search') and resource ('Swift Package Index for packages'), clearly stating what the tool does. It distinguishes itself from sibling tools by explicitly mentioning both 'list_search_filters()' and 'get_package_readme()' as related tools to call before and after using this one.

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

Usage Guidelines5/5

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

Provides explicit workflow guidance: when to use 'list_search_filters()' first ('If you are unsure what values are valid'), and what to do after results ('use get_package_readme...to read the README'). Also states critical constraints: 'At least one parameter must be provided' and 'Parameters are combined with AND logic', which are essential for correct invocation.

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/detailobsessed/spm-search'

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