Skip to main content
Glama

TinyFn

array_intersection

Get intersection of two arrays.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
array1YesFirst comma-separated array
array2YesSecond comma-separated array

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYes
unionNo
array1Yes
array2Yes
differenceNo
intersectionNo
symmetric_differenceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

No annotations provided. The description does not elaborate on behavior beyond the intersection operation, but for a simple set operation, the lack of detail about uniqueness or order is acceptable. No contradiction with annotations.

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?

Single sentence, no wasted words. The description is front-loaded and to the point.

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?

Given the simplicity of the tool and presence of output schema, the description is mostly adequate. It could mention that the result contains unique common elements, but the output schema likely handles that.

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%, both parameters have clear descriptions. The description adds no additional meaning beyond what is already in the input schema. Baseline 3 is appropriate.

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?

Description 'Get intersection of two arrays' clearly states the verb (Get) and resource (intersection of two arrays). It distinguishes from sibling tools like array_union, array_symmetric_difference, etc., which perform other set operations.

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 on when to use this tool versus alternatives. With many array operation siblings, the description should indicate when intersection is appropriate and when other operations might be better, but it does not.

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.