Skip to main content

Neon

ShanoneのNeon連携は、プロジェクト/ブランチのライフサイクル管理、データベース管理、バックアップ、Neon Auth、組織レベルの課金・アクセス制御にまたがる162個のツールをエージェントに提供します。

はじめに

1

Neon APIキーを取得する

NeonコンソールでAccount Settings > API Keysに移動し、新しいキーを発行します。
2

Shanoneにキーを追加する

ShanoneダッシュボードのIntegrations > Neonで、そのAPIキーを貼り付けます。
3

リクエストを再実行する

保存が完了すると、neon_*ツールに対するshanone_execute_tool呼び出しが成功するようになります。

利用可能なツール

ShanoneはNeon向けに162個のツールを、以下のカテゴリに整理して提供しています。
neon_list_projects, neon_get_project, neon_create_project, neon_delete_project, neon_update_project, neon_recover_project, neon_get_connection_uri, neon_list_preload_libraries, neon_list_regions, neon_get_connection_string
neon_list_branches, neon_create_branch, neon_delete_branch, neon_count_branches, neon_get_branch, neon_update_branch, neon_set_default_branch, neon_recover_branch, neon_restore_branch, neon_finalize_branch_restore, neon_get_branch_schema, neon_compare_branch_schema, neon_get_branch_storage, neon_get_branch_ai_gateway
neon_create_anonymized_branch, neon_get_anonymized_branch_status, neon_start_anonymization, neon_get_masking_rules, neon_update_masking_rules
neon_list_databases, neon_get_database, neon_create_database, neon_update_database, neon_delete_database, neon_list_roles, neon_create_role, neon_get_role, neon_delete_role, neon_reveal_role_password, neon_reset_role_password, neon_list_endpoints, neon_start_endpoint, neon_get_endpoint, neon_create_endpoint, neon_update_endpoint, neon_delete_endpoint, neon_restart_endpoint, neon_suspend_endpoint
neon_create_snapshot, neon_list_snapshots, neon_update_snapshot, neon_delete_snapshot, neon_restore_snapshot, neon_get_backup_schedule, neon_set_backup_schedule
neon_list_operations, neon_get_operation, neon_get_consumption_history, neon_get_consumption_history_legacy, neon_get_branch_consumption, neon_get_advisor_issues
neon_get_data_api, neon_create_data_api, neon_update_data_api, neon_delete_data_api, neon_list_functions, neon_get_function, neon_update_function, neon_delete_function, neon_deploy_function
neon_enable_auth, neon_get_auth, neon_disable_auth, neon_update_auth_config, neon_get_auth_allow_localhost, neon_update_auth_allow_localhost, neon_get_auth_webhook_config, neon_update_auth_webhook_config
neon_list_auth_trusted_domains, neon_add_auth_trusted_domain, neon_delete_auth_trusted_domain, neon_get_auth_password_config, neon_update_auth_password_config, neon_get_auth_email_provider, neon_update_auth_email_provider, neon_send_auth_test_email, neon_list_auth_oauth_providers, neon_add_auth_oauth_provider, neon_update_auth_oauth_provider, neon_delete_auth_oauth_provider
neon_get_auth_plugin_configs, neon_update_auth_magic_link_plugin, neon_update_auth_organization_plugin, neon_get_auth_phone_plugin, neon_update_auth_phone_plugin, neon_create_auth_user, neon_delete_auth_user, neon_update_auth_user_role
neon_list_legacy_auth_integrations, neon_create_legacy_auth_integration, neon_delete_legacy_auth_integration, neon_list_legacy_oauth_providers, neon_add_legacy_oauth_provider, neon_update_legacy_oauth_provider, neon_delete_legacy_oauth_provider, neon_create_legacy_auth_user, neon_delete_legacy_auth_user, neon_create_legacy_auth_sdk_keys, neon_transfer_legacy_auth_provider, neon_get_legacy_auth_email_server, neon_update_legacy_auth_email_server, neon_list_legacy_redirect_domains, neon_add_legacy_redirect_domain, neon_delete_legacy_redirect_domain
neon_list_buckets, neon_create_bucket, neon_delete_bucket, neon_list_bucket_objects, neon_delete_bucket_object, neon_download_bucket_object, neon_delete_bucket_objects_by_prefix, neon_presign_bucket_object
neon_list_api_keys, neon_create_api_key, neon_revoke_api_key, neon_list_credentials, neon_create_credential, neon_revoke_credential, neon_list_project_jwks, neon_add_project_jwks, neon_delete_project_jwks
neon_list_project_permissions, neon_grant_project_permission, neon_revoke_project_permission, neon_create_project_transfer_request, neon_accept_project_transfer_request, neon_transfer_projects_between_orgs, neon_transfer_projects_to_org
neon_list_project_vpc_endpoints, neon_set_project_vpc_endpoint, neon_delete_project_vpc_endpoint, neon_list_org_vpc_endpoints_all_regions, neon_list_org_vpc_endpoints, neon_get_org_vpc_endpoint, neon_assign_org_vpc_endpoint, neon_delete_org_vpc_endpoint
neon_get_organization, neon_list_org_members, neon_get_org_member, neon_update_org_member_role, neon_remove_org_member, neon_list_org_invitations, neon_create_org_invitations, neon_get_org_spending_limit, neon_set_org_spending_limit, neon_delete_org_spending_limit, neon_list_org_api_keys, neon_create_org_api_key, neon_revoke_org_api_key, neon_get_current_user, neon_list_user_organizations, neon_get_auth_details

よくあるユースケース

一時的なプレビューデータベース

PRごとにブランチを作成してマイグレーションを実行し、マージ後に削除する

安全なスキーマ変更

マイグレーションを本番に反映する前に、ブランチ間でスキーマを比較する

コスト監視

消費履歴を取得し、想定外の請求を避けるために組織の支出上限を設定する

バックエンド不要の認証

プロジェクトでNeon Authを有効化し、別の認証サービスなしでOAuthプロバイダを管理する

トラブルシューティング

新しいブランチには稼働中のcomputeエンドポイントが必要です——接続する前にneon_create_endpointを呼ぶ(または自動作成されているか確認する)、そしてneon_start_endpointを呼んでください。
パスワードを表示できるのはNeonを通じて作成されたロールのみです(外部管理のロールは不可)——表示できない場合はneon_reset_role_passwordで新しいパスワードを発行してください。
Neon Authはプロジェクトごとにneon_enable_authで明示的に有効化する必要があります——それより前は、ドメイン、OAuthプロバイダ、プラグインなどの関連設定を管理できません。
組織メンバー、課金、VPCエンドポイント関連のツールには、Neon組織における管理者ロールが必要です——neon_get_org_memberで自分のユーザーIDのロールを確認してください。