Skip to main content
Glama

list_latest

Retrieve newly added youth opportunities from all sources, sorted by recency, with optional filters for opportunity type and maximum number.

Instructions

List the newest opportunities across all sources, most recent first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNo
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The 'list_latest' MCP tool handler function. It accepts an optional OpportunityType filter and a limit (default 20), and returns the newest opportunities across all sources, most recent first. Delegates to Index.latest().
    @mcp.tool()
    def list_latest(
        type: OpportunityType | None = None,
        limit: int = 20,
    ) -> list[Opportunity]:
        """List the newest opportunities across all sources, most recent first."""
        return _get_index().latest(opp_type=type, limit=limit)
  • The tool is registered via the @mcp.tool() decorator on the list_latest function, which is how FastMCP registers MCP tools.
    @mcp.tool()
    def list_latest(
  • The OpportunityType enum used as a parameter type for list_latest. Defines valid opportunity types (scholarship, fellowship, internship, etc.).
    class OpportunityType(StrEnum):
        SCHOLARSHIP = "scholarship"
        FELLOWSHIP = "fellowship"
        INTERNSHIP = "internship"
        CONFERENCE = "conference"
        EXCHANGE = "exchange"
        COMPETITION = "competition"
        GRANT = "grant"
        AWARD = "award"
        OTHER = "other"
  • The Opportunity return type schema, defining the shape of each opportunity returned by list_latest.
    class Opportunity(BaseModel):
        """A single opportunity record. The shape every adapter must produce."""
    
        model_config = ConfigDict(use_enum_values=False)
    
        id: str = Field(..., description="sha1(source + canonical_url)[:16]")
        title: str
        type: OpportunityType
        summary: str = Field(..., max_length=500)
        deadline: date | None = None
        funded: FundingLevel = FundingLevel.UNKNOWN
        eligible_countries: list[str] | Literal["worldwide"] | None = None
        eligible_levels: list[StudyLevel] = Field(default_factory=list)
        host_country: str | None = None
        apply_url: AnyHttpUrl
        source_site: str
        source_url: AnyHttpUrl
        posted_at: datetime
        scraped_at: datetime
        raw_categories: list[str] = Field(default_factory=list)
  • The Index.latest() method that list_latest delegates to. Queries the SQLite database for opportunities ordered by posted_at DESC, with optional type filter and limit.
    def latest(
        self, *, opp_type: OpportunityType | None = None, limit: int = 20
    ) -> list[Opportunity]:
        sql = "SELECT * FROM opportunities"
        params: list = []
        if opp_type:
            sql += " WHERE type = ?"
            params.append(opp_type.value)
        sql += " ORDER BY posted_at DESC LIMIT ?"
        params.append(limit)
        rows = self.conn.execute(sql, params).fetchall()
        return [_row_to_opportunity(r) for r in rows]
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It mentions ordering (most recent first) and scope (all sources), but does not address authentication needs, rate limits, pagination, or whether the returned list is exhaustive (beyond a default limit of 20). The absence of such context limits transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, concise and front-loaded. However, it omits key information about parameters and does not structure additional details (e.g., bullet points). While not overly verbose, it lacks completeness.

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?

Given the sibling tools and the presence of an output schema, the description should provide enough context for correct tool selection and invocation. It fails to describe the filtering capability (type) and result limit, and offers no guidance on alternative tools for different queries. This makes it incomplete for agents.

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

Parameters1/5

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

The input schema has 0% parameter description coverage, and the description does not mention the 'type' or 'limit' parameters. An agent cannot infer that 'type' filters by opportunity category or that 'limit' controls result count. This is a critical gap.

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 lists the newest opportunities across all sources, sorted most recent first. This distinguishes it from sibling tools like list_upcoming_deadlines (deadline-focused) and search_opportunities (search-based). However, it does not explicitly note that it returns a limited set or that it can be filtered by type.

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?

No guidance is provided on when to use this tool versus alternatives such as search_opportunities for keyword search or list_upcoming_deadlines for deadline-oriented queries. Agents are left to infer usage context from the tool name and description 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/revolutionarybukhari/opportunity-mcp'

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