Skip to main content
Glama

NewzAI News MCP server

get_news_by_preference

Read-only

Fetches news for a specific saved user preference identified by its ID. The preference defines the category, region, and language of news to retrieve. Use get_user_preferences first to obtain valid preference IDs. Login is required to access this tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNoNumber of news items to return. Overrides the preference's default value
last_n_hoursNoNumber of hours to look back for news. Overrides the preference's default value
preference_idYesID of the saved user preference to fetch news for

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / k
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Number of news items to return. Overrides the preference's default value"
      +}
    • addedInput schema / properties / last_n_hours
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Number of hours to look back for news. Overrides the preference's default value"
      +}
  2. Changed2 schema fields changed
    • addedOutput schema / properties / result / items / properties / news_id
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / properties / result / items / required
      Previous value: -[
      -  "title",
      -  "source",
      -  "card_url",
      -  "summary",
      -  "age",
      -  "source_url"
      -]New value: +[
      +  "news_id",
      +  "title",
      +  "source",
      +  "card_url",
      +  "summary",
      +  "age",
      +  "source_url"
      +]
  3. Added

TDQS

A4/5.0
Behavior4/5

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

The description aligns with annotations (readOnlyHint true, destructiveHint false) and adds the behavioral constraint that login is required. It does not disclose other traits, but annotations already cover the safety profile, so the added context is valuable.

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

Conciseness5/5

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

Three sentences, zero unnecessary words, front-loaded with the core action. Information is efficiently packed: what it does, what the preference entails, prerequisite, and requirement. Ideal conciseness for a simple tool.

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

Completeness4/5

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

With an output schema present, return values are covered structurally. The description mentions prerequisite and authentication, providing sufficient context for a read-only retrieval tool. Minor gap: no mention of error cases or missing preferences, but acceptable for simplicity.

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?

Schema coverage is 100% with parameter descriptions. The description adds context that the preference defines category, region, and language, which helps understand preference_id, but does not elaborate on k or last_n_hours beyond what the schema already says. Thus minimal added value beyond the schema.

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 fetches news for a saved user preference by ID, specifying verb and resource. It distinguishes from sibling tools by referencing the prerequisite get_user_preferences, but doesn't explicitly contrast with similar tools like get_news_by_category. This is clear but not fully differentiated.

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

Usage Guidelines4/5

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

The description tells users to use get_user_preferences first to obtain valid IDs and notes that login is required. This provides clear when-to-use guidance, though it doesn't specify when not to use or alternative scenarios.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources