Skip to content

Make version parameter explicitly required for search_symbols function #1

@johnkferguson

Description

@johnkferguson

The search_symbols function currently marks the version parameter as optional, but testing shows it doesn't work without it. To avoid hidden assumptions about which version is being used, the version parameter should be explicitly required.

Current Behavior

  • Parameter is marked as optional in the schema
  • Function fails with HTTP error\! status: 404 when version is omitted
  • Works correctly when version is provided

Example that fails:

{
  "crateName": "std",
  "query": "Vec"
}

Example that works:

{
  "crateName": "serde", 
  "version": "1.0.219",
  "query": "Serialize"
}

Proposed Solution

Update the function schema to mark version as a required parameter. This provides clarity about which exact version is being searched and avoids any ambiguity about default version selection.

Benefits

  • Eliminates confusing 404 errors
  • Makes version selection explicit and intentional
  • Prevents assumptions about "latest" version behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions