Skip to main content
Glama

count assets

assets_count
Read-only

Count accessible organization assets by project, user, search query and media type without returning records. Use it to get only the total number of matching, non-deleted assets.

Instructions

Count the assets you can access in the current organization that match projectId, userId, searchQuery and types, the same filters as assets_list; filters combine, and deleted assets are not counted. Use it when you only need how many; use assets_list to see, pick or page through assets. Returns a bare number, not asset records. Omit sortBy, limit and cursor: they do not change the count, but they are still validated, so a limit outside 1 to 100 fails the call.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "assets_count"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoNo effect on the count; omit it. If sent, it must be an integer from 1 to 100 or the call fails validation.
typesNoOnly these media types: VIDEO, AUDIO or IMAGE, as one value or a list; an asset of any listed type matches.
cursorNoNo effect on the count; omit it.
sortByNoNo effect on the count; omit it.
userIdNoOnly assets created by this user: a user UUID.
projectIdNoOnly assets attached to this project: a project UUID from projects_list or projects_create.
audioSourceNoKeep only audio from this source: `tts` for saved text-to-speech output, `upload` for every other audio asset. Video and image assets are unaffected.
searchQueryNoCase-insensitive text matched anywhere in the asset name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.22
    • addedInput schema / properties / audioSource
      Added value: +{
      +  "description": "Keep only audio from this source: `tts` for saved text-to-speech output, `upload` for every other audio asset. Video and image assets are unaffected.",
      +  "enum": [
      +    "upload",
      +    "tts"
      +  ],
      +  "type": "string"
      +}
  2. Changed7 schema fields changedv0.2.4
    • changedInput schema / properties / cursor / description
      Previous value: -"Ignored when counting."New value: +"No effect on the count; omit it."
    • changedInput schema / properties / limit / description
      Previous value: -"Ignored when counting."New value: +"No effect on the count; omit it. If sent, it must be an integer from 1 to 100 or the call fails validation."
    • changedInput schema / properties / projectId / description
      Previous value: -"Only assets attached to this project (an id from projects_list or projects_create)."New value: +"Only assets attached to this project: a project UUID from projects_list or projects_create."
    • changedInput schema / properties / searchQuery / description
      Previous value: -"Text to match against names."New value: +"Case-insensitive text matched anywhere in the asset name."
    • changedInput schema / properties / sortBy / description
      Previous value: -"Sort order, such as dateDesc for newest first."New value: +"No effect on the count; omit it."
    • changedInput schema / properties / types / description
      Previous value: -"Only these media types: VIDEO, AUDIO or IMAGE, as one value or a list."New value: +"Only these media types: VIDEO, AUDIO or IMAGE, as one value or a list; an asset of any listed type matches."
    • changedInput schema / properties / userId / description
      Previous value: -"Only assets created by this user id."New value: +"Only assets created by this user: a user UUID."
  3. Changed7 schema fields changed
    • addedInput schema / properties / cursor / description
      Added value: +"Ignored when counting."
    • addedInput schema / properties / limit / description
      Added value: +"Ignored when counting."
    • addedInput schema / properties / projectId / description
      Added value: +"Only assets attached to this project (an id from projects_list or projects_create)."
    • addedInput schema / properties / searchQuery / description
      Added value: +"Text to match against names."
    • addedInput schema / properties / sortBy / description
      Added value: +"Sort order, such as dateDesc for newest first."
    • addedInput schema / properties / types / description
      Added value: +"Only these media types: VIDEO, AUDIO or IMAGE, as one value or a list."
    • addedInput schema / properties / userId / description
      Added value: +"Only assets created by this user id."
  4. Addedv0.1.5

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the read-only annotations, the description explains that filters combine, deleted assets are excluded, the result is a bare number rather than records, and irrelevant parameters are still validated. These are meaningful behavioral details for correct invocation.

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?

The description is front-loaded with purpose and scope, then moves through usage, output form, and validation caveats in a compact sequence. Each sentence carries actionable information.

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?

For a read-only count tool with rich schema coverage and annotations, the description supplies the missing behavioral context: what is counted, what is excluded, what is returned, and how irrelevant parameters behave. Nothing essential for correct invocation is absent.

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

Parameters4/5

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

The schema already documents all parameters at 100% coverage, but the description adds that filters combine and that they mirror assets_list. It omits audioSource from its explicit filter list, though the schema covers it, so it is very helpful but not fully complete.

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 states a specific verb and resource: count assets in the current organization matching named filters. It immediately distinguishes the tool from assets_list by scope and output, making the tool selectable without opening the schema.

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?

It explicitly says to use this tool when only a count is needed and to use assets_list to see, pick, or page through assets. It also tells the caller to omit sortBy, limit, and cursor, covering the main usage pitfalls.

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