Skip to content

feat: add support for listing devices#46

Merged
Patrik Simek (patriksimek) merged 2 commits intomainfrom
feat-add-devices
Apr 6, 2026
Merged

feat: add support for listing devices#46
Patrik Simek (patriksimek) merged 2 commits intomainfrom
feat-add-devices

Conversation

@patriksimek
Copy link
Copy Markdown
Member

Adds support for listing devices + updates connection and hook types.

@patriksimek Patrik Simek (patriksimek) requested a review from a team as a code owner April 6, 2026 23:39
Copilot AI review requested due to automatic review settings April 6, 2026 23:39
@patriksimek Patrik Simek (patriksimek) merged commit 6abc9dd into main Apr 6, 2026
6 checks passed
@patriksimek Patrik Simek (patriksimek) deleted the feat-add-devices branch April 6, 2026 23:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Devices endpoint to the Make SDK to support listing mobile devices registered to a team, along with associated typings, MCP tool definition, and test coverage. Also extends existing connection/hook types to include additional scenario metadata and bumps the package version.

Changes:

  • Add make.devices.list(teamId) endpoint + Device/DeviceInfo/ListDevicesOptions types.
  • Add a Jest spec + mock response fixture for listing devices.
  • Extend Hook and Connection types with additional scenario-related fields; bump version to 1.1.0.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/mocks/devices/list.json Adds mock API response for /devices listing.
test/devices.spec.ts Adds unit test verifying make.devices.list(teamId) request/response mapping.
src/make.ts Wires the new devices endpoint onto the Make client.
src/index.ts Re-exports devices-related public types.
src/endpoints/hooks.ts Extends Hook type with optional scenario metadata fields.
src/endpoints/devices.ts Implements the Devices endpoint class and related types.
src/endpoints/devices.mcp.ts Defines an MCP tool for listing devices.
src/endpoints/connections.ts Extends Connection type with optional scenarioUsages.
package.json Version bump to 1.1.0.
package-lock.json Lockfile version bump to 1.1.0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +3 to +25
export const tools = [
{
name: 'devices_list',
title: 'List devices',
description: 'List devices registered in a team',
category: 'devices',
scope: 'devices:read',
identifier: 'teamId',
annotations: {
readOnlyHint: true,
},
inputSchema: {
type: 'object',
properties: {
teamId: { type: 'number', description: 'The team ID to list devices for' },
},
required: ['teamId'],
},
execute: async (make: Make, args: { teamId: number }) => {
return await make.devices.list(args.teamId);
},
},
];
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This MCP tool definition isn’t wired into the exported MCP tool registry. src/mcp.ts enumerates endpoint tools via explicit imports/spreads into MakeMCPTools, but it doesn’t import/spread ./endpoints/devices.mcp.js, so devices_list won’t be discoverable/usable via MCP.

Copilot uses AI. Check for mistakes.
Comment thread src/endpoints/devices.ts
/**
* List devices for a team.
* @param teamId The team ID to list devices for
* @param options Optional parameters for filtering and pagination
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JSDoc for list() says options is for “filtering and pagination”, but ListDevicesOptions currently only supports cols. This is misleading for SDK consumers; update the comment to match the actual supported options (or add the missing options if they’re intended).

Suggested change
* @param options Optional parameters for filtering and pagination
* @param options Optional parameters for selecting response columns

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants