Skip to content

feat: add outputSchema option to fetch-actor-details tools#413

Merged
MQ37 merged 2 commits intomasterfrom
feat/actor-output-schema
Jan 28, 2026
Merged

feat: add outputSchema option to fetch-actor-details tools#413
MQ37 merged 2 commits intomasterfrom
feat/actor-output-schema

Conversation

@MQ37
Copy link
Copy Markdown
Contributor

@MQ37 MQ37 commented Jan 28, 2026

Implements complete actor output schema support: adds outputSchema boolean option to fetch-actor-details tools, enables output schema inference, and adds previewOutput control to call-actor for context management. The schema is passed through meta from the internal server and included in structured responses.

Technical Changes

  • Add outputSchema boolean option to actorDetailsOutputOptionsSchema for selective output
  • Pass actorOutputSchema through meta from internal server
  • Add typeObjectToString utility for human-readable type display in text responses
  • Include outputSchema in structured response content
  • Update fetch-actor-details and fetch-actor-details-internal tools
  • Add previewOutput boolean parameter to call-actor tool (default: true)
    • When false: returns only metadata (runId, datasetId, itemCount, schema) without preview items
    • Reduces context clutter when users plan to fetch specific fields via get-actor-output
  • Fix actorDetailsOutputSchema.outputSchema type from string to object
  • Add integration tests for previewOutput feature

Backward Compatibility

  • All new parameters default to existing behavior
  • No breaking changes to public API

- Add outputSchema boolean option to actorDetailsOutputOptionsSchema
- Pass actorOutputSchema through meta from internal server
- Add typeObjectToString utility for human-readable type display
- Include outputSchema in structured response content
- Update fetch-actor-details and fetch-actor-details-internal tools
@MQ37
Copy link
Copy Markdown
Contributor Author

MQ37 commented Jan 28, 2026

Linked PR: apify/apify-mcp-server-internal#295

This feature is coordinated with the internal server implementation. The internal PR should be merged only after this PR is merged and released.

@github-actions github-actions Bot added the t-ai Issues owned by the AI team. label Jan 28, 2026
@MQ37 MQ37 added beta Create beta prereleases and removed t-ai Issues owned by the AI team. labels Jan 28, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jan 28, 2026

Open in StackBlitz

npm i https://pkg.pr.new/apify/apify-mcp-server/@apify/actors-mcp-server@413

commit: 6f49564

@MQ37 MQ37 requested a review from jirispilka January 28, 2026 15:07
…a type

## Summary

- Add optional `previewOutput` parameter (default: true) to call-actor tool for controlling dataset preview in responses
- Fix `outputSchema` field type in actorDetailsOutputSchema from string to object
- Reduce context clutter when users plan to fetch specific fields via get-actor-output tool

## Technical Changes

- Add `previewOutput` boolean parameter to callActorArgs Zod schema with contextual description
- Pass `previewOutput` through callActorGetDataset to conditionally skip preview items extraction
- Update buildActorResponseContent to handle both preview modes with appropriate messaging
- Change actorDetailsOutputSchema.outputSchema type from 'string' to 'object' to match actual data
- Add 2 integration tests for previewOutput feature (true and false modes)

## Backward Compatibility

- previewOutput defaults to true, maintaining existing behavior
- No breaking changes to public API
@github-actions github-actions Bot added the t-ai Issues owned by the AI team. label Jan 28, 2026
Copy link
Copy Markdown
Collaborator

@jirispilka jirispilka left a comment

Choose a reason for hiding this comment

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

Looks ok!

@MQ37 MQ37 merged commit 5d2035f into master Jan 28, 2026
5 checks passed
@MQ37 MQ37 deleted the feat/actor-output-schema branch January 28, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta Create beta prereleases t-ai Issues owned by the AI team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants